| Index: include/core/SkSurface.h
|
| diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h
|
| index a87eccefdc9ee88796212ffa36072205538fe1e9..063475cec9c4f2e7cb6d410cb53ed338cd222095 100644
|
| --- a/include/core/SkSurface.h
|
| +++ b/include/core/SkSurface.h
|
| @@ -109,37 +109,18 @@ public:
|
| int height() const { return fHeight; }
|
|
|
| /**
|
| - * Returns a unique non-zero, unique value identifying the content of this
|
| - * surface. Each time the content is changed changed, either by drawing
|
| - * into this surface, or explicitly calling notifyContentChanged()) this
|
| - * method will return a new value.
|
| + * Returns a unique non-zero value identifying the content of this
|
| + * surface. Each time the content is changed changed by drawing
|
| + * into this surface through the canvas, this method will return a new
|
| + * value.
|
| *
|
| - * If this surface is empty (i.e. has a zero-dimention), this will return
|
| + * Implementations guarantee that all generationIDs are unique among
|
| + * all possible SkSurfaces and their possible contents.
|
| + *
|
| + * If this surface is empty (i.e. has a zero-dimension), this will return
|
| * 0.
|
| */
|
| - uint32_t generationID();
|
| -
|
| - /**
|
| - * Modes that can be passed to notifyContentWillChange
|
| - */
|
| - enum ContentChangeMode {
|
| - /**
|
| - * Use this mode if it is known that the upcoming content changes will
|
| - * clear or overwrite prior contents, thus making them discardable.
|
| - */
|
| - kDiscard_ContentChangeMode,
|
| - /**
|
| - * Use this mode if prior surface contents need to be preserved or
|
| - * if in doubt.
|
| - */
|
| - kRetain_ContentChangeMode,
|
| - };
|
| -
|
| - /**
|
| - * Call this if the contents are about to change. This will (lazily) force a new
|
| - * value to be returned from generationID() when it is called next.
|
| - */
|
| - void notifyContentWillChange(ContentChangeMode mode);
|
| + virtual uint32_t generationID() = 0;
|
|
|
| /**
|
| * Return a canvas that will draw into this surface. This will always
|
| @@ -221,16 +202,10 @@ protected:
|
| SkSurface(int width, int height, const SkSurfaceProps*);
|
| SkSurface(const SkImageInfo&, const SkSurfaceProps*);
|
|
|
| - // called by subclass if their contents have changed
|
| - void dirtyGenerationID() {
|
| - fGenerationID = 0;
|
| - }
|
| -
|
| private:
|
| const SkSurfaceProps fProps;
|
| const int fWidth;
|
| const int fHeight;
|
| - uint32_t fGenerationID;
|
|
|
| typedef SkRefCnt INHERITED;
|
| };
|
|
|