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

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: Improve testing Created 4 years, 9 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 | « no previous file | include/core/SkFlattenable.h » ('j') | tests/SerializeDrawableTest.cpp » ('J')
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..ee881bd31ceeac9429cb708e5c0d47392f8c43cb 100644
--- a/include/core/SkDrawable.h
+++ b/include/core/SkDrawable.h
@@ -8,7 +8,7 @@
#ifndef SkDrawable_DEFINED
#define SkDrawable_DEFINED
-#include "SkRefCnt.h"
+#include "SkFlattenable.h"
class SkCanvas;
class SkPicture;
@@ -21,7 +21,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 +58,9 @@ public:
*/
void notifyDrawingChanged();
+ SK_DEFINE_FLATTENABLE_TYPE(SkDrawable)
+ virtual Factory getFactory() const { return nullptr; }
+
protected:
virtual SkRect onGetBounds() = 0;
virtual void onDraw(SkCanvas*) = 0;
« no previous file with comments | « no previous file | include/core/SkFlattenable.h » ('j') | tests/SerializeDrawableTest.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698