Index: tests/RecordReplaceDrawTest.cpp |
diff --git a/tests/RecordReplaceDrawTest.cpp b/tests/RecordReplaceDrawTest.cpp |
index 0dd804ec9d024e33c8f86a6d90b22c6e25e5951b..388bee8d7b5dd1efffbe0cefee9aaa1470d27f97 100644 |
--- a/tests/RecordReplaceDrawTest.cpp |
+++ b/tests/RecordReplaceDrawTest.cpp |
@@ -78,6 +78,11 @@ DEF_TEST(RecordReplaceDraw_Unbalanced, r) { |
canvas->save(); |
canvas->scale(2, 2); |
pic = recorder.finishRecordingAsPicture(); |
+ |
+ // we may have optimized everything away. If so, just return |
+ if (pic->approximateOpCount() == 0) { |
+ return; |
+ } |
} |
SkRecord rerecord; |