aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/lighting.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gm/lighting.cpp')
-rw-r--r--gm/lighting.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/gm/lighting.cpp b/gm/lighting.cpp
index 891d63a5e4..50dceb44e1 100644
--- a/gm/lighting.cpp
+++ b/gm/lighting.cpp
@@ -85,11 +85,15 @@ protected:
SkColor white(0xFFFFFFFF);
SkPaint paint;
+#ifdef SK_CROP_RECT_IS_INT
SkIRect cropRect = SkIRect::MakeXYWH(20, 10, 60, 65);
+#else
+ SkImageFilter::CropRect cropRect(SkRect::MakeXYWH(20, 10, 60, 65));
+#endif
int y = 0;
for (int i = 0; i < 2; i++) {
- const SkIRect* cr = (i == 0) ? NULL : &cropRect;
+ const SkImageFilter::CropRect* cr = (i == 0) ? NULL : &cropRect;
paint.setImageFilter(SkLightingImageFilter::CreatePointLitDiffuse(pointLocation, white, surfaceScale, kd, NULL, cr))->unref();
drawClippedBitmap(canvas, paint, 0, y);