DM: add a Via to simulate SP pictures.
Will use this to test the other CL that adds small SkPicture implementations.
Not quite sure why patch_primitive doesn't draw the same in 8888 and sp-8888, but everything else does, so I'm not going to let that hold me back for now.
BUG=skia:
Review URL: https://codereview.chromium.org/1126613005
diff --git a/dm/DMSrcSink.h b/dm/DMSrcSink.h
index ea5572a..0d612d0 100644
--- a/dm/DMSrcSink.h
+++ b/dm/DMSrcSink.h
@@ -295,6 +295,17 @@
SkAutoTDelete<Sink> fSink;
};
+class ViaSingletonPictures : public Sink {
+public:
+ explicit ViaSingletonPictures(Sink*);
+
+ Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const override;
+ int enclave() const override { return fSink->enclave(); }
+ const char* fileExtension() const override { return fSink->fileExtension(); }
+private:
+ SkAutoTDelete<Sink> fSink;
+};
+
} // namespace DM
#endif//DMSrcSink_DEFINED