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

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

Issue 2230513004: Re-adding analytical GeoProc for rectangles (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Addressed patch 2 comments Created 4 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 | « src/gpu/batches/GrAnalyticRectBatch.cpp ('k') | no next file » | 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 4512f6a1f9bdf005d7d72a8ef4d98b7826ab8b00..c9b6843596bec49802efde4fe5bc04ede07e545e 100644
--- a/src/gpu/batches/GrRectBatchFactory.h
+++ b/src/gpu/batches/GrRectBatchFactory.h
@@ -10,9 +10,11 @@
#include "GrAAFillRectBatch.h"
#include "GrAAStrokeRectBatch.h"
+#include "GrAnalyticRectBatch.h"
#include "GrColor.h"
#include "GrNonAAFillRectBatch.h"
#include "GrNonAAStrokeRectBatch.h"
+#include "GrPaint.h"
#include "SkMatrix.h"
class GrBatch;
@@ -37,11 +39,17 @@ inline GrDrawBatch* CreateNonAAFill(GrColor color,
}
}
-inline GrDrawBatch* CreateAAFill(GrColor color,
+inline GrDrawBatch* CreateAAFill(const GrPaint& paint,
const SkMatrix& viewMatrix,
const SkRect& rect,
+ const SkRect& croppedRect,
const SkRect& devRect) {
- return GrAAFillRectBatch::Create(color, viewMatrix, rect, devRect);
+ if (!paint.usesDistanceVectorField()) {
+ return GrAAFillRectBatch::Create(paint.getColor(), viewMatrix, croppedRect, devRect);
+ } else {
+ return GrAnalyticRectBatch::CreateAnalyticRectBatch(paint.getColor(), viewMatrix, rect,
+ croppedRect, devRect);
+ }
}
inline GrDrawBatch* CreateAAFill(GrColor color,
« no previous file with comments | « src/gpu/batches/GrAnalyticRectBatch.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698