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; |