Chromium Code Reviews| Index: src/core/SkRecordDraw.cpp |
| diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp |
| index 626dd6d792e6ff0a210b72d5938c99711f945006..0fa5c78b4dce5773487bbeb6428d31ec62542e31 100644 |
| --- a/src/core/SkRecordDraw.cpp |
| +++ b/src/core/SkRecordDraw.cpp |
| @@ -22,8 +22,12 @@ void SkRecordDraw(const SkRecord& record, |
| // 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)) { |
| + // We want to make sure our query rectangle is never totally empty. |
| + // Clear ignores the clip, so it must draw even if the clip is logically empty. |
| + query = SkRect::MakeWH(SK_ScalarNearlyZero, SK_ScalarNearlyZero); |
|
Justin Novosad
2014/11/19 22:22:26
Having content at 0,0 is common, if you positioned
|
| + } |
| SkTDArray<unsigned> ops; |
| bbh->search(query, &ops); |