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

Unified Diff: src/gpu/GrClipMaskManager.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/GrClipMaskCache.cpp ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrClipMaskManager.h
diff --git a/src/gpu/GrClipMaskManager.h b/src/gpu/GrClipMaskManager.h
index 33a77c1ba9d7cc0104b690601a8a82e846f5fe91..842ff99197b6412fdc8e40a3f5f0d1179669df1f 100644
--- a/src/gpu/GrClipMaskManager.h
+++ b/src/gpu/GrClipMaskManager.h
@@ -8,7 +8,6 @@
#define GrClipMaskManager_DEFINED
#include "GrClipMaskCache.h"
-#include "GrContext.h"
#include "GrPipelineBuilder.h"
#include "GrReducedClip.h"
#include "GrStencil.h"
@@ -35,11 +34,7 @@ class SkPath;
*/
class GrClipMaskManager : SkNoncopyable {
public:
- GrClipMaskManager()
- : fCurrClipMaskType(kNone_ClipMaskType)
- , fClipTarget(NULL)
- , fClipMode(kIgnoreClip_StencilClipMode) {
- }
+ GrClipMaskManager(GrClipTarget* owner);
/**
* Creates a clip mask if necessary as a stencil buffer or alpha texture
@@ -68,15 +63,13 @@ public:
return kAlpha_ClipMaskType == fCurrClipMaskType;
}
- GrContext* getContext() {
- return fAACache.getContext();
- }
-
void setClipTarget(GrClipTarget*);
void adjustPathStencilParams(const GrStencilAttachment*, GrStencilSettings*);
private:
+ inline GrContext* getContext();
+
/**
* Informs the helper function adjustStencilParams() about how the stencil
* buffer clip is being used.
@@ -190,7 +183,7 @@ private:
} fCurrClipMaskType;
GrClipMaskCache fAACache; // cache for the AA path
- GrClipTarget* fClipTarget;
+ GrClipTarget* fClipTarget; // This is our owning clip target.
StencilClipMode fClipMode;
typedef SkNoncopyable INHERITED;
« no previous file with comments | « src/gpu/GrClipMaskCache.cpp ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698