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

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: rm commented out code and add comment 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
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.
robertphillips 2015/11/23 17:22:55 // This will increase the size of the resulting ge
bsalomon 2015/11/23 17:59:34 It's not fundamentally for clipping. The current c
+ 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) {

Powered by Google App Engine
This is Rietveld 408576698