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; |