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

Unified Diff: src/gpu/batches/GrAAStrokeRectBatch.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/GrAALinearizingConvexPathRenderer.cpp ('k') | src/gpu/batches/GrAtlasTextBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAAStrokeRectBatch.cpp
diff --git a/src/gpu/batches/GrAAStrokeRectBatch.cpp b/src/gpu/batches/GrAAStrokeRectBatch.cpp
index 8188f7a9793d0e4bb0b9d904b629b56ca2231df9..8c42c9a039431e32f13d87faed4f1cf9642cf213 100644
--- a/src/gpu/batches/GrAAStrokeRectBatch.cpp
+++ b/src/gpu/batches/GrAAStrokeRectBatch.cpp
@@ -128,7 +128,7 @@ public:
SkASSERT(!devInside.isEmpty())
fGeoData.emplace_back(Geometry{color, devOutside, devOutside, devInside, false});
- fBounds = devOutside;
+ this->setBounds(devOutside, HasAABloat::kYes, IsZeroArea::kNo);
fMiterStroke = true;
}
@@ -145,8 +145,7 @@ public:
compute_rects(&geo.fDevOutside, &geo.fDevOutsideAssist, &geo.fDevInside, &geo.fDegenerate,
viewMatrix, rect, stroke.getWidth(), isMiter);
geo.fColor = color;
- batch->fBounds = geo.fDevOutside;
- batch->fBounds.join(geo.fDevOutsideAssist);
+ batch->setBounds(geo.fDevOutside, HasAABloat::kYes, IsZeroArea::kNo);
batch->fViewMatrix = viewMatrix;
return batch;
}
@@ -413,7 +412,7 @@ bool AAStrokeRectBatch::onCombineIfPossible(GrBatch* t, const GrCaps& caps) {
fBatch.fColor = GrColor_ILLEGAL;
}
fGeoData.push_back_n(that->fGeoData.count(), that->fGeoData.begin());
- this->joinBounds(that->bounds());
+ this->joinBounds(*that);
return true;
}
« no previous file with comments | « src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp ('k') | src/gpu/batches/GrAtlasTextBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698