aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/blurs.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2014-11-17 07:41:35 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-11-17 07:41:35 -0800
commit468b6b4eaf4b30384d34041ca66676b5762548ec (patch)
treee335b4ce3ea54903446534ebf5cea557710ef787 /gm/blurs.cpp
parentdace19ec17e85872df3fb35212e1b8bce72018b6 (diff)
tweak gm to show fractional offsets
BUG=skia: TBR= Review URL: https://codereview.chromium.org/728403002
Diffstat (limited to 'gm/blurs.cpp')
-rw-r--r--gm/blurs.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/gm/blurs.cpp b/gm/blurs.cpp
index 2581b5780f..69c7210d47 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);
}