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

Unified Diff: src/image/SkSurface_Base.h

Issue 1254383006: SkImage_Raster's pixels are always immutable. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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
Index: src/image/SkSurface_Base.h
diff --git a/src/image/SkSurface_Base.h b/src/image/SkSurface_Base.h
index a52a2b44d92a7be8eee31e114bc6da9a26b6c991..8f0eef3b60e4c854ae0734bff00fc2d11c903b1a 100644
--- a/src/image/SkSurface_Base.h
+++ b/src/image/SkSurface_Base.h
@@ -68,9 +68,17 @@ public:
*/
virtual void onCopyOnWrite(ContentChangeMode) = 0;
+ /**
+ * Signal the surface to remind its backing store that it's mutable again.
+ * Called only when we _didn't_ copy-on-write; we assume the copies start mutable.
+ */
+ virtual void onRestoreBackingMutability() {}
+
inline SkCanvas* getCachedCanvas();
inline SkImage* getCachedImage(Budgeted);
+ bool hasCachedImage() const { return fCachedImage != NULL; }
+
// called by SkSurface to compute a new genID
uint32_t newGenerationID();

Powered by Google App Engine
This is Rietveld 408576698