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

Unified Diff: src/gpu/GrStyle.h

Issue 1970003003: Add bounds to GrShape (Closed) Base URL: https://chromium.googlesource.com/skia.git@grshapeisempty
Patch Set: put back const& 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
« no previous file with comments | « src/gpu/GrShape.cpp ('k') | tests/GrShapeTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrStyle.h
diff --git a/src/gpu/GrStyle.h b/src/gpu/GrStyle.h
index 07efb40866b91df4f9fbbfd9bef3763c0712d3e2..cbaa50d9ef9b7d2f6d55036c8ff366a43a6ca7d7 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);
+ // This may not be the correct SkStrokeRec to use. skbug.com/5299
+ // It happens to work for dashing.
+ SkScalar radius = fStrokeRec.getInflationRadius();
+ dst->outset(radius, radius);
} else {
SkScalar radius = fStrokeRec.getInflationRadius();
*dst = src.makeOutset(radius, radius);
« no previous file with comments | « src/gpu/GrShape.cpp ('k') | tests/GrShapeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698