Index: dm/DMSrcSink.h |
diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h |
index e163a24253f88e4ed58b2ca956588b0b16c96c24..67c8e5cf4f1aad7098027cb9fc3c20e77daf46b0 100644 |
--- a/dm/DMSrcSink.h |
+++ b/dm/DMSrcSink.h |
@@ -8,6 +8,7 @@ |
#include "SkCanvas.h" |
#include "SkData.h" |
#include "SkGPipe.h" |
+#include "SkNullCanvas.h" |
#include "SkPicture.h" |
#include "gm.h" |
@@ -175,6 +176,15 @@ private: |
SkAutoTDelete<Sink> fSink; |
}; |
+class NullSink : public Sink { |
+public: |
+ Error draw(const Src& src, SkBitmap*, SkWStream* out) const SK_OVERRIDE { |
+ return src.draw(SkCreateNullCanvas()); |
+ } |
+ int enclave() const SK_OVERRIDE { return kAnyThread_Enclave; } |
+ const char* fileExtension() const SK_OVERRIDE { return ""; } |
+}; |
+ |
} // namespace DM |
#endif//DMSrcSink_DEFINED |