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

Unified Diff: src/gpu/batches/GrTessellatingPathRenderer.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/batches/GrBatch.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrTessellatingPathRenderer.cpp
diff --git a/src/gpu/batches/GrTessellatingPathRenderer.cpp b/src/gpu/batches/GrTessellatingPathRenderer.cpp
index 901d38369cfe072496a306b063544a8846a98b39..a3a888302a15ee775f2ba88208f77b0678ff0b06 100644
--- a/src/gpu/batches/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/batches/GrTessellatingPathRenderer.cpp
@@ -1592,9 +1592,17 @@ private:
, fColor(color)
, fPath(path)
, fStroke(stroke)
- , fViewMatrix(viewMatrix)
- , fClipBounds(clipBounds) {
- fBounds = path.getBounds();
+ , fViewMatrix(viewMatrix) {
+ const SkRect& pathBounds = path.getBounds();
+ fClipBounds = clipBounds;
+ // Because the clip bounds are used to add a contour for inverse fills, they must also
+ // include the path bounds.
+ fClipBounds.join(pathBounds);
+ if (path.isInverseFillType()) {
+ fBounds = fClipBounds;
+ } else {
+ fBounds = path.getBounds();
+ }
if (!stroke.isFillStyle()) {
SkScalar radius = SkScalarHalf(stroke.getWidth());
if (stroke.getJoin() == SkPaint::kMiter_Join) {
« no previous file with comments | « src/gpu/batches/GrBatch.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698