Index: dm/DMSrcSinkAndroid.h |
diff --git a/dm/DMSrcSinkAndroid.h b/dm/DMSrcSinkAndroid.h |
index 1c5fe71f18c635f633ac3d01b746dec1b5431868..56de2227cef59008de8897dc0cbb54d7b36fce02 100644 |
--- a/dm/DMSrcSinkAndroid.h |
+++ b/dm/DMSrcSinkAndroid.h |
@@ -12,10 +12,14 @@ |
#include "DMSrcSink.h" |
+#include "SkDrawFilter.h" |
+ |
namespace DM { |
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ |
+// Draws to the Android Framework's HWUI API. |
+ |
class HWUISink : public Sink { |
public: |
HWUISink() { } |
@@ -31,6 +35,24 @@ private: |
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ |
+// Trims draw commands and paint fields to only include options exposed by Android's HWUI. |
+// (Some mix of what's exposed by the Java and native APIs.) |
+ |
+class ViaAndroidSDK : public Sink { |
+public: |
+ ViaAndroidSDK(Sink*); |
mtklein
2015/03/03 15:55:14
Can't hurt to make this explicit.
tomhudson
2015/03/05 14:53:52
Done.
|
+ |
+ Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE; |
+ int enclave() const SK_OVERRIDE { return fSink->enclave(); } |
+ const char* fileExtension() const SK_OVERRIDE { return fSink->fileExtension(); } |
+ |
+private: |
+ SkAutoTDelete<Sink> fSink; |
+ SkAutoTDelete<SkDrawFilter> fFilter; |
djsollen
2015/03/03 16:50:52
just put the filter on the stack. No need to reus
tomhudson
2015/03/05 14:53:52
Done.
|
+}; |
+ |
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ |
+ |
} // namespace DM |
#endif // SK_BUILD_FOR_ANDROID_FRAMEWORK |