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

Unified Diff: src/gpu/batches/GrMSAAPathRenderer.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/GrDrawVerticesBatch.cpp ('k') | src/gpu/batches/GrNinePatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrMSAAPathRenderer.cpp
diff --git a/src/gpu/batches/GrMSAAPathRenderer.cpp b/src/gpu/batches/GrMSAAPathRenderer.cpp
index f0137c6ce945f7c6d1baee5cd28600555cd5a121..51389ecddbd6ae06a410c8fc85ba2b89a7dcdd5f 100644
--- a/src/gpu/batches/GrMSAAPathRenderer.cpp
+++ b/src/gpu/batches/GrMSAAPathRenderer.cpp
@@ -225,12 +225,11 @@ class MSAAPathBatch : public GrVertexBatch {
public:
DEFINE_BATCH_CLASS_ID
- MSAAPathBatch(GrColor color, const SkPath& path, const SkMatrix& viewMatrix,
- const SkRect& devBounds)
+ MSAAPathBatch(GrColor color, const SkPath& path, const SkMatrix& viewMatrix)
: INHERITED(ClassID())
, fViewMatrix(viewMatrix) {
fPaths.emplace_back(PathInfo{color, path});
- this->setBounds(devBounds);
+ this->setTransformedBounds(path.getBounds(), viewMatrix, HasAABloat::kNo, IsZeroArea::kNo);
int contourCount;
this->computeWorstCasePointCount(path, &contourCount, &fMaxLineVertices, &fMaxQuadVertices);
fMaxLineIndices = fMaxLineVertices * 3;
@@ -460,7 +459,7 @@ private:
}
fPaths.push_back_n(that->fPaths.count(), that->fPaths.begin());
- this->joinBounds(that->bounds());
+ this->joinBounds(*that);
fIsIndexed = true;
fMaxLineVertices += that->fMaxLineVertices;
fMaxQuadVertices += that->fMaxQuadVertices;
@@ -668,8 +667,8 @@ bool GrMSAAPathRenderer::internalDrawPath(GrDrawContext* drawContext,
drawContext->drawBatch(pipelineBuilder, clip, batch);
} else {
- SkAutoTUnref<MSAAPathBatch> batch(new MSAAPathBatch(paint.getColor(), path, viewMatrix,
- devBounds));
+ SkAutoTUnref<MSAAPathBatch> batch(new MSAAPathBatch(paint.getColor(), path,
+ viewMatrix));
if (!batch->isValid()) {
return false;
}
« no previous file with comments | « src/gpu/batches/GrDrawVerticesBatch.cpp ('k') | src/gpu/batches/GrNinePatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698