Chromium Code Reviews| Index: src/core/SkCanvasDrawable.h |
| diff --git a/src/core/SkCanvasDrawable.h b/src/core/SkCanvasDrawable.h |
| index 807bbc7ab1e1d8e731960a8563acc0b0e51ec09f..32142dc71804b6434f76ad73a2c66ffbb2dcf21e 100644 |
| --- a/src/core/SkCanvasDrawable.h |
| +++ b/src/core/SkCanvasDrawable.h |
| @@ -10,6 +10,7 @@ |
| #include "SkRefCnt.h" |
| +class SkBBHFactory; |
| class SkCanvas; |
| struct SkRect; |
| @@ -31,6 +32,11 @@ public: |
| */ |
| void draw(SkCanvas*); |
| + SkPicture* newPictureSnapshot(SkBBHFactory* bbhFactory, uint32_t recordFlags); |
| + SkPicture* newPictureSnapshot() { |
| + return this->newPictureSnapshot(NULL, 0); |
| + } |
| + |
| /** |
| * Return a unique value for this instance. If two calls to this return the same value, |
| * it is presumed that calling the draw() method will render the same thing as well. |
| @@ -45,7 +51,7 @@ public: |
| * set the parameter to that rectangle. If one is not known, ignore the parameter and |
| * return false. |
|
mtklein
2014/11/17 20:23:21
Update docs?
reed1
2014/11/17 20:35:58
Done.
|
| */ |
| - bool getBounds(SkRect*); |
| + SkRect getBounds(); |
| /** |
| * Calling this invalidates the previous generation ID, and causes a new one to be computed |
| @@ -55,9 +61,9 @@ public: |
| void notifyDrawingChanged(); |
| protected: |
| + virtual SkRect onGetBounds() = 0; |
| virtual void onDraw(SkCanvas*) = 0; |
| - |
| - virtual bool onGetBounds(SkRect*) { return false; } |
| + virtual SkPicture* onNewPictureSnapshot(SkBBHFactory*, uint32_t recordFlags); |
| private: |
| int32_t fGenerationID; |