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

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

Issue 2127673002: Consolidate handling of infinitely thin primitives and aa bloat handing WRT batch bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@AAStrokeRect
Patch Set: update for instanced rendering Created 4 years, 5 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/GrDrawPathBatch.cpp ('k') | src/gpu/batches/GrMSAAPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrDrawVerticesBatch.cpp
diff --git a/src/gpu/batches/GrDrawVerticesBatch.cpp b/src/gpu/batches/GrDrawVerticesBatch.cpp
index 81f418f2db3586c056797c7563b8770dc8135bd2..e56502205541524ba877cc5520fb8c5f36f22057 100644
--- a/src/gpu/batches/GrDrawVerticesBatch.cpp
+++ b/src/gpu/batches/GrDrawVerticesBatch.cpp
@@ -63,7 +63,13 @@ GrDrawVerticesBatch::GrDrawVerticesBatch(GrColor color, GrPrimitiveType primitiv
fIndexCount = indexCount;
fPrimitiveType = primitiveType;
- this->setBounds(bounds);
+ IsZeroArea zeroArea;
+ if (GrIsPrimTypeLines(primitiveType) || kPoints_GrPrimitiveType == primitiveType) {
+ zeroArea = IsZeroArea::kYes;
+ } else {
+ zeroArea = IsZeroArea::kNo;
+ }
+ this->setBounds(bounds, HasAABloat::kNo, zeroArea);
}
void GrDrawVerticesBatch::computePipelineOptimizations(GrInitInvariantOutput* color,
@@ -200,7 +206,7 @@ bool GrDrawVerticesBatch::onCombineIfPossible(GrBatch* t, const GrCaps& caps) {
fVertexCount += that->fVertexCount;
fIndexCount += that->fIndexCount;
- this->joinBounds(that->bounds());
+ this->joinBounds(*that);
return true;
}
« no previous file with comments | « src/gpu/batches/GrDrawPathBatch.cpp ('k') | src/gpu/batches/GrMSAAPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698