Chromium Code Reviews| Index: src/image/SkSurface_Base.h |
| =================================================================== |
| --- src/image/SkSurface_Base.h (revision 8708) |
| +++ src/image/SkSurface_Base.h (working copy) |
| @@ -48,10 +48,8 @@ |
| * If the surface is about to change, we call this so that our subclass |
| * can optionally fork their backend (copy-on-write) in case it was |
| * being shared with the cachedImage. |
| - * |
| - * The default implementation does nothing. |
| */ |
| - virtual void onCopyOnWrite() = 0; |
| + virtual void onCopyOnWrite(bool canDiscardContents) = 0; |
|
reed1
2013/04/18 14:48:33
Lets use an enum or bit-flags for this and aboutTo
|
| inline SkCanvas* getCachedCanvas(); |
| inline SkImage* getCachedImage(); |
| @@ -63,7 +61,7 @@ |
| SkCanvas* fCachedCanvas; |
| SkImage* fCachedImage; |
| - void aboutToDraw(); |
| + void aboutToDraw(bool canDiscardContents); |
| friend class SkCanvas; |
| friend class SkSurface; |