aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrClipMaskManager.h
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-05-29 09:45:57 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-29 09:45:57 -0700
commitedd77a112dedd82dae78ccdd7177531569c4e6f7 (patch)
tree8a70c8be3dd11a09744d1ac7625887745da78bb8 /src/gpu/GrClipMaskManager.h
parentc4fba51ea6991258edfe04e7e0d25daabfafe4fc (diff)
Remove GrContext from GrClipMaskCache
Diffstat (limited to 'src/gpu/GrClipMaskManager.h')
-rw-r--r--src/gpu/GrClipMaskManager.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/src/gpu/GrClipMaskManager.h b/src/gpu/GrClipMaskManager.h
index 33a77c1ba9..842ff99197 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;