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

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

Issue 1928133002: Unify implementations of stroking radius calculations (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: use makeOutset Created 4 years, 8 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/core/SkStrokeRec.cpp ('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 39aa50c59753271701fee799c9ad86fe42a460f0..2c8520b28aeb9764ad2d603fb417af8ca9487ae6 100644
--- a/src/gpu/batches/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/batches/GrTessellatingPathRenderer.cpp
@@ -258,16 +258,8 @@ private:
} else {
fBounds = path.getBounds();
}
- if (!stroke.isFillStyle()) {
- SkScalar radius = SkScalarHalf(stroke.getWidth());
- if (stroke.getJoin() == SkPaint::kMiter_Join) {
- SkScalar scale = stroke.getMiter();
- if (scale > SK_Scalar1) {
- radius = SkScalarMul(radius, scale);
- }
- }
- fBounds.outset(radius, radius);
- }
+ SkScalar radius = stroke.getInflationRadius();
+ fBounds.outset(radius, radius);
viewMatrix.mapRect(&fBounds);
}
« no previous file with comments | « src/core/SkStrokeRec.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698