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

Unified Diff: src/gpu/GrDrawTarget.h

Issue 695873002: small fix for clip mask cache clear (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more cleanup Created 6 years, 2 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/gpu/GrClipMaskManager.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.h
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index 1f26166f6e9f96ddc66cc744f0346727b1001c61..7d8a03ce718836caf1c507af32a1a34aa347e2d6 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -968,6 +968,16 @@ public:
*/
virtual void clearStencilClip(const SkIRect& rect, bool insideClip, GrRenderTarget* = NULL) = 0;
+ /**
+ * Release any resources that are cached but not currently in use. This
+ * is intended to give an application some recourse when resources are low.
+ */
+ virtual void purgeResources() SK_OVERRIDE {
+ // The clip mask manager can rebuild all its clip masks so just
+ // get rid of them all.
+ fClipMaskManager.purgeResources();
+ };
+
protected:
GrClipMaskManager fClipMaskManager;
« no previous file with comments | « src/gpu/GrClipMaskManager.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698