Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(213)

Unified Diff: src/image/SkSurface_Base.h

Issue 14063015: Adding optimization to avoid image copy in SkSurface copy on write when content is discardable (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/image/SkSurface.cpp ('k') | src/image/SkSurface_Gpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(ContentChangeMode) = 0;
inline SkCanvas* getCachedCanvas();
inline SkImage* getCachedImage();
@@ -63,7 +61,7 @@
SkCanvas* fCachedCanvas;
SkImage* fCachedImage;
- void aboutToDraw();
+ void aboutToDraw(ContentChangeMode mode);
friend class SkCanvas;
friend class SkSurface;
« no previous file with comments | « src/image/SkSurface.cpp ('k') | src/image/SkSurface_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698