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

Unified Diff: gm/blurs.cpp

Issue 728403002: tweak gm to show fractional offsets (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/blurs.cpp
diff --git a/gm/blurs.cpp b/gm/blurs.cpp
index 2581b5780f227514834453981d4d1dbf95f1f0c6..69c7210d472cf09590807b4f72a44449fb491af7 100644
--- a/gm/blurs.cpp
+++ b/gm/blurs.cpp
@@ -118,8 +118,8 @@ public:
paint.setMaskFilter(SkBlurMaskFilter::Create(kNormal_SkBlurStyle,
2.3f))->unref();
- SkRect outer = SkRect::MakeXYWH(10.125f, 10.125f, 100, 100);
- SkRect inner = SkRect::MakeXYWH(20.125f, 20.125f, 80, 80);
+ SkRect outer = SkRect::MakeXYWH(10.125f, 10.125f, 100.125f, 100);
+ SkRect inner = SkRect::MakeXYWH(20.25f, 20.125f, 80, 80);
SkPath path;
path.addRect(outer, SkPath::kCW_Direction);
path.addRect(inner, SkPath::kCCW_Direction);
@@ -127,7 +127,7 @@ public:
canvas->drawPath(path, paint);
// important to translate by a factional amount to exercise a different "phase"
// of the same path w.r.t. the pixel grid
- SkScalar dx = SkScalarRoundToScalar(path.getBounds().width()) + 14 + 0.125f;
+ SkScalar dx = SkScalarRoundToScalar(path.getBounds().width()) + 14 + 0.25f;
canvas->translate(dx, 0);
canvas->drawPath(path, paint);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698