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

Unified Diff: src/gpu/batches/GrRectBatchFactory.h

Issue 1336413006: Just an experiment (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 3 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 | « src/gpu/batches/GrNonAAStrokeRectBatch.h ('k') | src/gpu/draws/GrDraw.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrRectBatchFactory.h
diff --git a/src/gpu/batches/GrRectBatchFactory.h b/src/gpu/batches/GrRectBatchFactory.h
index 16eeaee02c382fb3bc9d1ba8fa6d28223064ec63..dd2152705075080914005e583ec050020f8576bc 100644
--- a/src/gpu/batches/GrRectBatchFactory.h
+++ b/src/gpu/batches/GrRectBatchFactory.h
@@ -14,9 +14,9 @@
#include "GrNonAAFillRectBatch.h"
#include "GrNonAAStrokeRectBatch.h"
#include "SkMatrix.h"
+#include "SkRect.h"
class GrBatch;
-struct SkRect;
class SkStrokeRec;
/*
@@ -39,6 +39,16 @@ inline GrDrawBatch* CreateNonAAFill(GrColor color,
inline GrDrawBatch* CreateAAFill(GrColor color,
const SkMatrix& viewMatrix,
+ const SkRect& rect) {
+
+ // map rect
+ SkRect devRect;
+ viewMatrix.mapRect(&devRect, rect);
+ return GrAAFillRectBatch::Create(color, viewMatrix, rect, devRect);
+}
+
+inline GrDrawBatch* CreateAAFill(GrColor color,
+ const SkMatrix& viewMatrix,
const SkRect& rect,
const SkRect& devRect) {
return GrAAFillRectBatch::Create(color, viewMatrix, rect, devRect);
@@ -47,9 +57,8 @@ inline GrDrawBatch* CreateAAFill(GrColor color,
inline GrDrawBatch* CreateAAFill(GrColor color,
const SkMatrix& viewMatrix,
const SkMatrix& localMatrix,
- const SkRect& rect,
- const SkRect& devRect) {
- return GrAAFillRectBatch::Create(color, viewMatrix, localMatrix, rect, devRect);
+ const SkRect& rect) {
+ return GrAAFillRectBatch::Create(color, viewMatrix, localMatrix, rect);
}
inline GrDrawBatch* CreateNonAAStroke(GrColor color,
« no previous file with comments | « src/gpu/batches/GrNonAAStrokeRectBatch.h ('k') | src/gpu/draws/GrDraw.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698