aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--gm/imageblurtiled.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/gm/imageblurtiled.cpp b/gm/imageblurtiled.cpp
index c3bcab998b..7200b1b418 100644
--- a/gm/imageblurtiled.cpp
+++ b/gm/imageblurtiled.cpp
@@ -34,7 +34,9 @@ protected:
paint.setImageFilter(SkBlurImageFilter::Create(fSigmaX, fSigmaY))->unref();
const SkScalar tile_size = SkIntToScalar(128);
SkRect bounds;
- canvas->getClipBounds(&bounds);
+ if (!canvas->getClipBounds(&bounds)) {
+ bounds.setEmpty();
+ }
for (SkScalar y = bounds.top(); y < bounds.bottom(); y += tile_size) {
for (SkScalar x = bounds.left(); x < bounds.right(); x += tile_size) {
canvas->save();