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

Unified Diff: dm/DMSrcSinkAndroid.h

Issue 974913002: ViaAndroidSDK for DM (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Derek's comment changes 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') | no next file with comments »
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..4f07d989290f5be63f26bb4e3b975e09fb7b018c 100644
--- a/dm/DMSrcSinkAndroid.h
+++ b/dm/DMSrcSinkAndroid.h
@@ -16,6 +16,8 @@ namespace DM {
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+// Draws to the Android Framework's HWUI API.
+
class HWUISink : public Sink {
public:
HWUISink() { }
@@ -31,6 +33,22 @@ private:
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+// Trims draw commands to only include those supported by the Android Framework's HWUI API.
+
+class ViaAndroidSDK : public Sink {
+public:
+ explicit ViaAndroidSDK(Sink*);
+
+ 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;
+};
+
+/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
+
} // namespace DM
#endif // SK_BUILD_FOR_ANDROID_FRAMEWORK
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMSrcSinkAndroid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698