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

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

Issue 1355353002: Create GrDraw and start fast pathing src over rects (Closed) Base URL: https://skia.googlesource.com/skia.git@strokerect2
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/GrNonAAFillRectBatch.h ('k') | src/gpu/batches/GrNonAAStrokeRectBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrNonAAFillRectBatch.cpp
diff --git a/src/gpu/batches/GrNonAAFillRectBatch.cpp b/src/gpu/batches/GrNonAAFillRectBatch.cpp
index 545bfdc973e9d17ed185c9513451380dc56c8b4d..eb185fa49dfb8545b33f42ec867267aa54bd1a87 100644
--- a/src/gpu/batches/GrNonAAFillRectBatch.cpp
+++ b/src/gpu/batches/GrNonAAFillRectBatch.cpp
@@ -269,15 +269,19 @@ bool Append(GrBatch* origBatch,
bool usePerspective = viewMatrix.hasPerspective() ||
(localMatrix && localMatrix->hasPerspective());
- if (usePerspective && origBatch->classID() != NonAAFillRectBatchPerspective::ClassID()) {
- return false;
- }
-
if (!usePerspective) {
+ if (origBatch->classID() != NonAAFillRectBatchSimple::ClassID()) {
+ return false;
+ }
+
NonAAFillRectBatchSimple* batch = origBatch->cast<NonAAFillRectBatchSimple>();
append_to_batch(batch, color, viewMatrix, rect, localRect, localMatrix);
batch->updateBoundsAfterAppend();
} else {
+ if (origBatch->classID() != NonAAFillRectBatchPerspective::ClassID()) {
+ return false;
+ }
+
NonAAFillRectBatchPerspective* batch = origBatch->cast<NonAAFillRectBatchPerspective>();
const NonAAFillRectBatchPerspective::Geometry& geo = batch->geoData()->back();
« no previous file with comments | « src/gpu/batches/GrNonAAFillRectBatch.h ('k') | src/gpu/batches/GrNonAAStrokeRectBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698