BitmapTextBatch and BitmapTextBlob
BUG=skia:
Committed: https://skia.googlesource.com/skia/+/eed1dae04932483579b02c10f0706127d3f5d984
Review URL: https://codereview.chromium.org/1011403004
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 8bb1b25..929ff05 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -243,8 +243,21 @@
return SkStringPrintf("Couldn't decode %s as a picture.", fPath.c_str());
}
stream.reset((SkStream*)NULL); // Might as well drop this when we're done with it.
+
canvas->clipRect(kSKPViewport);
+ // Testing TextBlob batching requires that we see individual text blobs more than once
+ // TODO remove this and add a flag to DM so we can run skps multiple times
+//#define DOUBLE_LOOP
+#ifdef DOUBLE_LOOP
+ {
+ SkAutoCanvasRestore acr(canvas, true);
+#endif
+ canvas->drawPicture(pic);
+#ifdef DOUBLE_LOOP
+ }
+ canvas->clear(0);
canvas->drawPicture(pic);
+#endif
return "";
}