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

Unified Diff: include/core/SkDrawable.h

Issue 1837913003: Add support for serializing/deserializing of SkDrawable (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase Created 4 years, 8 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 | « gyp/core.gypi ('k') | include/core/SkFlattenable.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkDrawable.h
diff --git a/include/core/SkDrawable.h b/include/core/SkDrawable.h
index 2f0a62d8b5eb8c824a8c91927fa52a6ecd7b5f5a..6fec3fcf939854080fa2ef3a9953a0fb03e8f879 100644
--- a/include/core/SkDrawable.h
+++ b/include/core/SkDrawable.h
@@ -8,9 +8,10 @@
#ifndef SkDrawable_DEFINED
#define SkDrawable_DEFINED
-#include "SkRefCnt.h"
+#include "SkFlattenable.h"
class SkCanvas;
+class SkMatrix;
class SkPicture;
struct SkRect;
@@ -21,7 +22,7 @@ struct SkRect;
* allow for clients of the drawable that may want to cache the results, the drawable must
* change its generation ID whenever its internal state changes such that it will draw differently.
*/
-class SkDrawable : public SkRefCnt {
+class SkDrawable : public SkFlattenable {
public:
SkDrawable();
@@ -58,6 +59,9 @@ public:
*/
void notifyDrawingChanged();
+ SK_DEFINE_FLATTENABLE_TYPE(SkDrawable)
+ Factory getFactory() const override { return nullptr; }
+
protected:
virtual SkRect onGetBounds() = 0;
virtual void onDraw(SkCanvas*) = 0;
« no previous file with comments | « gyp/core.gypi ('k') | include/core/SkFlattenable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698