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

Unified Diff: src/gpu/GrDrawTarget.cpp

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/GrDrawTarget.h ('k') | src/gpu/GrResourceProvider.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index a2c824b58c24458debb698c3a303af860cd85f51..5adc68acf25bc4ec31fb610db04df4c06651d47b 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -540,15 +540,25 @@ GrDrawTarget::PipelineInfo::PipelineInfo(GrPipelineBuilder* pipelineBuilder,
}
///////////////////////////////////////////////////////////////////////////////
+GrClipTarget::GrClipTarget(GrContext* context) : INHERITED(context) {
+ fClipMaskManager.reset(SkNEW_ARGS(GrClipMaskManager, (this)));
+}
+
bool GrClipTarget::setupClip(GrPipelineBuilder* pipelineBuilder,
GrPipelineBuilder::AutoRestoreFragmentProcessors* arfp,
GrPipelineBuilder::AutoRestoreStencil* ars,
GrScissorState* scissorState,
const SkRect* devBounds) {
- return fClipMaskManager.setupClipping(pipelineBuilder,
+ return fClipMaskManager->setupClipping(pipelineBuilder,
arfp,
ars,
scissorState,
devBounds);
}
+
+void GrClipTarget::purgeResources() {
+ // The clip mask manager can rebuild all its clip masks so just
+ // get rid of them all.
+ fClipMaskManager->purgeResources();
+};
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrResourceProvider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698