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

Unified Diff: dm/DMSrcSinkAndroid.h

Issue 974913002: ViaAndroidSDK for DM (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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/DM.cpp ('k') | dm/DMSrcSinkAndroid.cpp » ('j') | dm/DMSrcSinkAndroid.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMSrcSinkAndroid.cpp » ('j') | dm/DMSrcSinkAndroid.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698