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

Unified Diff: src/image/SkSurface_Base.h

Issue 1236023004: have canvas send discard instead of retain if the draw would overwrite everything (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
« src/core/SkCanvas.cpp ('K') | « src/image/SkSurface.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkSurface_Base.h
diff --git a/src/image/SkSurface_Base.h b/src/image/SkSurface_Base.h
index b8eb7dd5f11d7ef92f927705d5ec27e8ff463d6f..a52a2b44d92a7be8eee31e114bc6da9a26b6c991 100644
--- a/src/image/SkSurface_Base.h
+++ b/src/image/SkSurface_Base.h
@@ -79,6 +79,11 @@ private:
SkImage* fCachedImage;
void aboutToDraw(ContentChangeMode mode);
+
+ // Returns true if there is an outstanding image-snapshot, indicating that a call to aboutToDraw
+ // would trigger a copy-on-write.
+ bool outstandingImageSnapshot() const;
+
friend class SkCanvas;
friend class SkSurface;
« src/core/SkCanvas.cpp ('K') | « src/image/SkSurface.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698