diff options
author | 2015-05-29 09:45:57 -0700 | |
---|---|---|
committer | 2015-05-29 09:45:57 -0700 | |
commit | edd77a112dedd82dae78ccdd7177531569c4e6f7 (patch) | |
tree | 8a70c8be3dd11a09744d1ac7625887745da78bb8 /src/gpu/GrDrawTarget.h | |
parent | c4fba51ea6991258edfe04e7e0d25daabfafe4fc (diff) |
Remove GrContext from GrClipMaskCache
Review URL: https://codereview.chromium.org/1144013007
Diffstat (limited to 'src/gpu/GrDrawTarget.h')
-rw-r--r-- | src/gpu/GrDrawTarget.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h index 53129ed7ca..8b9c0ee5f0 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*, |