| Index: src/core/SkCanvasDrawable.h
|
| diff --git a/src/core/SkCanvasDrawable.h b/src/core/SkCanvasDrawable.h
|
| index 8092ea0b7a49755cbe2f497fa37425015b1cfe30..807bbc7ab1e1d8e731960a8563acc0b0e51ec09f 100644
|
| --- a/src/core/SkCanvasDrawable.h
|
| +++ b/src/core/SkCanvasDrawable.h
|
| @@ -14,9 +14,11 @@ class SkCanvas;
|
| struct SkRect;
|
|
|
| /**
|
| - * Base-class to capture a set of drawing commands (sent to SkCanvas). Instances of this class
|
| - * need not be thread-safe, but they must be able to be used in a thread different from where
|
| - * they were created.
|
| + * Base-class for objects that draw into SkCanvas.
|
| + *
|
| + * The object has a generation ID, which is guaranteed to be unique across all drawables. To
|
| + * 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 SkCanvasDrawable : public SkRefCnt {
|
| public:
|
| @@ -45,6 +47,11 @@ public:
|
| */
|
| bool getBounds(SkRect*);
|
|
|
| + /**
|
| + * Calling this invalidates the previous generation ID, and causes a new one to be computed
|
| + * the next time getGenerationID() is called. Typically this is called by the object itself,
|
| + * in response to its internal state changing.
|
| + */
|
| void notifyDrawingChanged();
|
|
|
| protected:
|
|
|