Index: include/core/SkDrawable.h |
diff --git a/include/core/SkDrawable.h b/include/core/SkDrawable.h |
index 2f0a62d8b5eb8c824a8c91927fa52a6ecd7b5f5a..59a0a37fc19a6f1034d450450d13caba5165e2e5 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) |
+ virtual Factory getFactory() const { return nullptr; } |
reed1
2016/03/31 18:42:05
Is this an override of the method in SkFlattenable
msarett
2016/04/01 14:11:44
Yes! Fixed.
|
+ |
protected: |
virtual SkRect onGetBounds() = 0; |
virtual void onDraw(SkCanvas*) = 0; |