Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Unified Diff: src/gpu/batches/GrAAFillRectBatch.cpp

Issue 1293823003: fix viewmatrix mapping in AAFillRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAAFillRectBatch.cpp
diff --git a/src/gpu/batches/GrAAFillRectBatch.cpp b/src/gpu/batches/GrAAFillRectBatch.cpp
index e8cef787ea3d7074d9d7c02aa34806261c98132b..a483f4d0c9137715effe8e02bc79a0b41cda8259 100644
--- a/src/gpu/batches/GrAAFillRectBatch.cpp
+++ b/src/gpu/batches/GrAAFillRectBatch.cpp
@@ -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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698