aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm
diff options
context:
space:
mode:
authorGravatar jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-20 19:02:34 +0000
committerGravatar jvanverth@google.com <jvanverth@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-02-20 19:02:34 +0000
commitd98df1a3c468a2a7a5fff5efbf6dbdaf077d1abe (patch)
tree181dae4410ebf61eaf19812603e3e8a4b5d7c7f9 /gm
parent1e1a24e2cae6a6b2536d158294c874300ef822b1 (diff)
Fix compile errors in blur code on Windows.
Various typecasts to remove warnings and get this code building on Windows. git-svn-id: http://skia.googlecode.com/svn/trunk@7797 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm')
-rw-r--r--gm/blurrect.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/gm/blurrect.cpp b/gm/blurrect.cpp
index 52f177db8a..a6fc56dd4f 100644
--- a/gm/blurrect.cpp
+++ b/gm/blurrect.cpp
@@ -177,14 +177,14 @@ protected:
r.setWH(SkIntToScalar(fRectWidth), SkIntToScalar(fRectHeight));
SkISize canvas_size = canvas->getDeviceSize();
- int center_x = (canvas_size.fWidth - r.width())/2;
- int center_y = (canvas_size.fHeight - r.height())/2;
+ int center_x = (canvas_size.fWidth - (int)(r.width()))/2;
+ int center_y = (canvas_size.fHeight - (int)(r.height()))/2;
SkMask mask;
if (!this->makeMask(&mask, r)) {
SkPaint paint;
- r.offset( center_x, center_y );
+ r.offset( SkIntToScalar(center_x), SkIntToScalar(center_y) );
canvas->drawRect(r,paint);
return;
}
@@ -197,7 +197,7 @@ protected:
center_x = (canvas_size.fWidth - mask.fBounds.width())/2;
center_y = (canvas_size.fHeight - mask.fBounds.height())/2;
- canvas->drawBitmap(bm, center_x, center_y, NULL);
+ canvas->drawBitmap(bm, SkIntToScalar(center_x), SkIntToScalar(center_y), NULL);
}
virtual uint32_t onGetFlags() const { return kSkipPipe_Flag; }