Index: gm/lighting.cpp |
diff --git a/gm/lighting.cpp b/gm/lighting.cpp |
index 891d63a5e4483ded157d3d935c639c76ee050f68..50dceb44e109a85e173098b8efbf25fa6975740a 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); |