fix viewmatrix mapping in AAFillRect
TBR=bsalomon@google.com BUG=skia: Review URL: https://codereview.chromium.org/1293823003
This commit is contained in:
parent
540e4888a5
commit
40ac15a62e
@ -220,8 +220,9 @@ private:
|
||||
vec[1].scale(SK_ScalarHalf);
|
||||
|
||||
// create the rotated rect
|
||||
fan0Pos->setRectFan(args.fDevRect.fLeft, args.fDevRect.fTop,
|
||||
args.fDevRect.fRight, args.fDevRect.fBottom, vertexStride);
|
||||
fan0Pos->setRectFan(args.fRect.fLeft, args.fRect.fTop,
|
||||
args.fRect.fRight, args.fRect.fBottom, vertexStride);
|
||||
args.fViewMatrix.mapPointsWithStride(fan0Pos, vertexStride, 4);
|
||||
|
||||
// Now create the inset points and then outset the original
|
||||
// rotated points
|
||||
@ -328,6 +329,7 @@ class AAFillRectBatchNoLocalMatrixImp {
|
||||
public:
|
||||
struct Geometry {
|
||||
SkMatrix fViewMatrix;
|
||||
SkRect fRect;
|
||||
SkRect fDevRect;
|
||||
GrColor fColor;
|
||||
};
|
||||
@ -359,6 +361,7 @@ public:
|
||||
struct Geometry {
|
||||
SkMatrix fViewMatrix;
|
||||
SkMatrix fLocalMatrix;
|
||||
SkRect fRect;
|
||||
SkRect fDevRect;
|
||||
GrColor fColor;
|
||||
};
|
||||
@ -407,6 +410,7 @@ GrDrawBatch* Create(GrColor color,
|
||||
AAFillRectBatchNoLocalMatrix::Geometry& geo = *batch->geometry();
|
||||
geo.fColor = color;
|
||||
geo.fViewMatrix = viewMatrix;
|
||||
geo.fRect = rect;
|
||||
geo.fDevRect = devRect;
|
||||
batch->init();
|
||||
return batch;
|
||||
@ -422,6 +426,7 @@ GrDrawBatch* Create(GrColor color,
|
||||
geo.fColor = color;
|
||||
geo.fViewMatrix = viewMatrix;
|
||||
geo.fLocalMatrix = localMatrix;
|
||||
geo.fRect = rect;
|
||||
geo.fDevRect = devRect;
|
||||
batch->init();
|
||||
return batch;
|
||||
|
Loading…
Reference in New Issue
Block a user