aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/distantclip.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-17 12:05:40 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-09-17 12:05:40 +0000
commit968c17dddad328cd9e4bd3cb9dea2f47c206f231 (patch)
treeba92c7ea103f1a1dabb4461bf9cc2ff0e795b1ef /gm/distantclip.cpp
parentbf3ef28f3bd86f2de488f03f1cd08b6e6203d479 (diff)
fixed compiler complaints
Diffstat (limited to 'gm/distantclip.cpp')
-rw-r--r--gm/distantclip.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/gm/distantclip.cpp b/gm/distantclip.cpp
index 09dacea401..6691d2a547 100644
--- a/gm/distantclip.cpp
+++ b/gm/distantclip.cpp
@@ -36,7 +36,12 @@ protected:
SkCanvas* rec = pict.beginRecording(100, offset + extents);
rec->drawColor(0xffff0000);
rec->save();
- SkRect r = {-extents, offset - extents, extents, offset + extents};
+ SkRect r = {
+ SkIntToScalar(-extents),
+ SkIntToScalar(offset - extents),
+ SkIntToScalar(extents),
+ SkIntToScalar(offset + extents)
+ };
SkPath p;
p.addRoundRect(r, 5, 5);
rec->clipPath(p, SkRegion::kIntersect_Op, true);
@@ -51,7 +56,8 @@ protected:
// Finally we play the part of that second picture that should be green into the canvas.
canvas->save();
- canvas->translate(extents / 2, -(offset - extents / 2));
+ canvas->translate(SkIntToScalar(extents / 2),
+ SkIntToScalar(-(offset - extents / 2)));
pict2.draw(canvas);
canvas->restore();