aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DM.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dm/DM.cpp')
-rw-r--r--dm/DM.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 15c1cfa5c9..e162e7762c 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);
}
}