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

Unified Diff: src/gpu/GrClipMaskManager.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/GrClipMaskManager.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrClipMaskManager.cpp
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index f8e045ba7f8f41f6d96a625bff3b6b5daea8f59a..9d79a6dc89cda3249e1035562fdd2054e2b2dd34 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -77,6 +77,15 @@ bool path_needs_SW_renderer(GrContext* context,
}
}
+GrClipMaskManager::GrClipMaskManager(GrClipTarget* clipTarget)
+ : fCurrClipMaskType(kNone_ClipMaskType)
+ , fAACache(clipTarget->getContext()->resourceProvider())
+ , fClipTarget(clipTarget)
+ , fClipMode(kIgnoreClip_StencilClipMode) {
+}
+
+GrContext* GrClipMaskManager::getContext() { return fClipTarget->getContext(); }
+
/*
* This method traverses the clip stack to see if the GrSoftwarePathRenderer
* will be used on any element. If so, it returns true to indicate that the
@@ -1110,11 +1119,6 @@ void GrClipMaskManager::purgeResources() {
fAACache.purgeResources();
}
-void GrClipMaskManager::setClipTarget(GrClipTarget* clipTarget) {
- fClipTarget = clipTarget;
- fAACache.setContext(clipTarget->getContext());
-}
-
void GrClipMaskManager::adjustPathStencilParams(const GrStencilAttachment* stencilAttachment,
GrStencilSettings* settings) {
if (stencilAttachment) {
« no previous file with comments | « src/gpu/GrClipMaskManager.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698