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

Unified Diff: dm/DM.cpp

Issue 873723007: DM::NullSink (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: changes Created 5 years, 11 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 | dm/DMJsonWriter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 15c1cfa5c9425f49b830e1d3b6551993a811a7e2..e162e7762c8bac68ae42041b263e54132d716747 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -221,6 +221,7 @@ static Sink* create_sink(const char* tag) {
SINK("8888", RasterSink, kN32_SkColorType);
SINK("pdf", PDFSink);
SINK("skp", SKPSink);
+ SINK("null", NullSink);
}
#undef SINK
return NULL;
@@ -339,7 +340,8 @@ struct Task {
const char* ext = task->sink->fileExtension();
if (data->getLength()) {
WriteToDisk(*task, md5, ext, data, data->getLength(), NULL);
- } else {
+ SkASSERT(bitmap.drawsNothing());
+ } else if (!bitmap.drawsNothing()) {
WriteToDisk(*task, md5, ext, NULL, 0, &bitmap);
}
}
« no previous file with comments | « no previous file | dm/DMJsonWriter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698