Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Unified Diff: dm/DMSrcSink.cpp

Issue 1011403004: BitmapTextBatch and BitmapTextBlob (Closed) Base URL: https://skia.googlesource.com/skia.git@dfpr_take_2
Patch Set: fix for segfault Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gyp/gpu.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DMSrcSink.cpp
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 8bb1b25cbd8a862bf891efbec8fedcae859baf71..929ff0556b453de2a5786595fb107e69fdc4febe 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -243,8 +243,21 @@ Error SKPSrc::draw(SkCanvas* canvas) const {
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 "";
}
« no previous file with comments | « no previous file | gyp/gpu.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698