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

Unified Diff: src/gpu/GrStyle.h

Issue 1970003003: Add bounds to GrShape (Closed) Base URL: https://chromium.googlesource.com/skia.git@grshapeisempty
Patch Set: minor Created 4 years, 7 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
Index: src/gpu/GrStyle.h
diff --git a/src/gpu/GrStyle.h b/src/gpu/GrStyle.h
index 07efb40866b91df4f9fbbfd9bef3763c0712d3e2..3a88703d9cfd46e490d956e9306b225fd9382fb5 100644
--- a/src/gpu/GrStyle.h
+++ b/src/gpu/GrStyle.h
@@ -167,6 +167,10 @@ public:
void adjustBounds(SkRect* dst, const SkRect& src) const {
if (this->pathEffect()) {
this->pathEffect()->computeFastBounds(dst, src);
robertphillips 2016/05/12 17:18:47 Do we want to share the inflation code between the
bsalomon 2016/05/12 18:37:57 I think this line will be removed when/if the bug
+ // This may not be the correct SkStrokeRec to use. skbug.com/5299
+ // It happens to work for dashing.
+ SkScalar radius = fStrokeRec.getInflationRadius();
robertphillips 2016/05/12 17:18:47 Would "dst->outset(radius, radius);" be clearer?
bsalomon 2016/05/12 18:37:57 Done.
+ *dst = dst->makeOutset(radius, radius);
} else {
SkScalar radius = fStrokeRec.getInflationRadius();
*dst = src.makeOutset(radius, radius);

Powered by Google App Engine
This is Rietveld 408576698