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

Unified Diff: src/gpu/GrDrawTarget.h

Issue 1144013007: Remove GrContext from GrClipMaskCache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: more Created 5 years, 7 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.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('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 53129ed7ca8259d4aa84a17fc4f1753bf40bffaa..8b9c0ee5f0900acfd435835e1f36b10d2c65e303 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -329,10 +329,7 @@ private:
*/
class GrClipTarget : public GrDrawTarget {
public:
- GrClipTarget(GrContext* context)
- : INHERITED(context) {
- fClipMaskManager.setClipTarget(this);
- }
+ GrClipTarget(GrContext*);
/* Clip mask manager needs access to the context.
* TODO we only need a very small subset of context in the CMM.
@@ -352,17 +349,13 @@ public:
* Release any resources that are cached but not currently in use. This
* is intended to give an application some recourse when resources are low.
*/
- void purgeResources() override {
- // The clip mask manager can rebuild all its clip masks so just
- // get rid of them all.
- fClipMaskManager.purgeResources();
- };
+ void purgeResources() override;
protected:
- GrClipMaskManager fClipMaskManager;
+ SkAutoTDelete<GrClipMaskManager> fClipMaskManager;
private:
- GrClipMaskManager* clipMaskManager() override { return &fClipMaskManager; }
+ GrClipMaskManager* clipMaskManager() override { return fClipMaskManager; }
virtual bool setupClip(GrPipelineBuilder*,
GrPipelineBuilder::AutoRestoreFragmentProcessors*,
« no previous file with comments | « src/gpu/GrClipMaskManager.cpp ('k') | src/gpu/GrDrawTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698