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

Unified Diff: src/gpu/batches/GrAALinearizingConvexPathRenderer.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/GrAAHairLinePathRenderer.cpp ('k') | src/gpu/batches/GrAAStrokeRectBatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
diff --git a/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
index 46296198607db32d107a4f869ac4505ca17e30f6..20d93d8e9009935e7e8c70aee1559b3e5b26610e 100644
--- a/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
+++ b/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
@@ -131,7 +131,7 @@ public:
fGeoData.emplace_back(Geometry{color, viewMatrix, path, strokeWidth, join, miterLimit});
// compute bounds
- fBounds = path.getBounds();
+ SkRect bounds = path.getBounds();
SkScalar w = strokeWidth;
if (w > 0) {
w /= 2;
@@ -139,9 +139,9 @@ public:
if (SkPaint::kMiter_Join == join && w > 1.f) {
w *= miterLimit;
}
- fBounds.outset(w, w);
+ bounds.outset(w, w);
}
- viewMatrix.mapRect(&fBounds);
+ this->setTransformedBounds(bounds, viewMatrix, HasAABloat::kYes, IsZeroArea::kNo);
}
const char* name() const override { return "AAConvexBatch"; }
@@ -284,7 +284,7 @@ private:
}
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/GrAAHairLinePathRenderer.cpp ('k') | src/gpu/batches/GrAAStrokeRectBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698