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

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

Issue 1467253002: Restrict query bounds for reduce clip to dev bounds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 5 years, 1 month 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/GrReducedClip.cpp ('k') | src/gpu/batches/GrBatch.h » ('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 e6cf035ce6a86ec6170bbe95109ae8c59d63ba02..659f9d4adf62599cea8cd8c0cc3a901a7fa562d5 100644
--- a/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
+++ b/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
@@ -264,6 +264,15 @@ private:
// compute bounds
fBounds = geometry.fPath.getBounds();
+ SkScalar w = geometry.fStrokeWidth;
+ if (w > 0) {
+ w /= 2;
+ // If the miter limit is < 1 then we effectively fallback to bevel joins.
+ if (SkPaint::kMiter_Join == geometry.fJoin && w > 1.f) {
+ w *= geometry.fMiterLimit;
+ }
+ fBounds.outset(w, w);
+ }
geometry.fViewMatrix.mapRect(&fBounds);
}
« no previous file with comments | « src/gpu/GrReducedClip.cpp ('k') | src/gpu/batches/GrBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698