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(); |