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

Unified Diff: include/core/SkCanvas.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: wip 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
« no previous file with comments | « no previous file | src/core/SkCanvas.cpp » ('j') | src/core/SkCanvas.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index ca6818518d74078401d0d73a1b3cfdc61d842010..d454d082d6477c779f281903c71602ab7ec5ac4a 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -1357,7 +1357,8 @@ protected:
// notify our surface (if we have one) that we are about to draw, so it
// can perform copy-on-write or invalidate any cached images
- void predrawNotify();
+ void predrawNotify(bool completeOverwrite = false);
+ void predrawNotify(const SkRect*, const SkPaint*);
private:
class MCRec;
@@ -1453,6 +1454,9 @@ private:
// only for canvasutils
const SkRegion& internal_private_getTotalClip() const;
+ bool willOverwriteAllPixels(const SkRect*, const SkPaint*) const;
+
+
/* These maintain a cache of the clip bounds in local coordinates,
(converted to 2s-compliment if floats are slow).
*/
« no previous file with comments | « no previous file | src/core/SkCanvas.cpp » ('j') | src/core/SkCanvas.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698