Make RTree handle the case where the playback canvas has empty clip bounds
BUG=skia:3074
Review URL: https://codereview.chromium.org/678303004
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp
index 5981245..ad13270 100644
--- a/src/core/SkRecordDraw.cpp
+++ b/src/core/SkRecordDraw.cpp
@@ -20,8 +20,10 @@
// is not necessarily in that same space. getClipBounds() returns us
// this canvas' clip bounds transformed back into identity space, which
// lets us query the BBH.
- SkRect query = { 0, 0, 0, 0 };
- (void)canvas->getClipBounds(&query);
+ SkRect query;
+ if (!canvas->getClipBounds(&query)) {
+ return;
+ }
SkTDArray<unsigned> ops;
bbh->search(query, &ops);