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

Unified Diff: dm/DMSrcSink.h

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 | « dm/DMJsonWriter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « dm/DMJsonWriter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698