| Index: src/gpu/GrClipMaskManager.h
|
| diff --git a/src/gpu/GrClipMaskManager.h b/src/gpu/GrClipMaskManager.h
|
| index fe1ff0efde6758e3ade70139361203b068775daf..e4d7223c7e0cdc807d795da5f40020e5b39bb2e3 100644
|
| --- a/src/gpu/GrClipMaskManager.h
|
| +++ b/src/gpu/GrClipMaskManager.h
|
| @@ -22,7 +22,7 @@
|
| #include "SkTLList.h"
|
| #include "SkTypes.h"
|
|
|
| -class GrGpu;
|
| +class GrClipTarget;
|
| class GrPathRenderer;
|
| class GrPathRendererChain;
|
| class GrTexture;
|
| @@ -39,8 +39,8 @@ class SkPath;
|
| class GrClipMaskManager : SkNoncopyable {
|
| public:
|
| GrClipMaskManager()
|
| - : fGpu(NULL)
|
| - , fCurrClipMaskType(kNone_ClipMaskType) {
|
| + : fCurrClipMaskType(kNone_ClipMaskType)
|
| + , fClipTarget(NULL) {
|
| }
|
|
|
| // The state of the scissor is controlled by the clip manager, no one else should set
|
| @@ -64,7 +64,7 @@ public:
|
| const SkRect* devBounds,
|
| GrDrawState::AutoRestoreEffects*,
|
| GrDrawState::AutoRestoreStencil*,
|
| - ScissorState* scissorState);
|
| + ScissorState*);
|
|
|
| /**
|
| * Purge resources to free up memory. TODO: This class shouldn't hold any long lived refs
|
| @@ -89,10 +89,19 @@ public:
|
| return fAACache.getContext();
|
| }
|
|
|
| - void setGpu(GrGpu* gpu);
|
| + void setClipTarget(GrClipTarget*);
|
| +
|
| + void adjustPathStencilParams(GrStencilSettings*);
|
|
|
| - void adjustPathStencilParams(GrStencilSettings* settings);
|
| private:
|
| + enum PrivateDrawStateStateBits {
|
| + kFirstBit = (GrDrawState::kLastPublicStateBit << 1),
|
| +
|
| + kModifyStencilClip_StateBit = kFirstBit, // allows draws to modify
|
| + // stencil bits used for
|
| + // clipping.
|
| + };
|
| +
|
| /**
|
| * Informs the helper function adjustStencilParams() about how the stencil
|
| * buffer clip is being used.
|
| @@ -107,21 +116,6 @@ private:
|
| kIgnoreClip_StencilClipMode,
|
| };
|
|
|
| - GrGpu* fGpu;
|
| -
|
| - /**
|
| - * We may represent the clip as a mask in the stencil buffer or as an alpha
|
| - * texture. It may be neither because the scissor rect suffices or we
|
| - * haven't yet examined the clip.
|
| - */
|
| - enum ClipMaskType {
|
| - kNone_ClipMaskType,
|
| - kStencil_ClipMaskType,
|
| - kAlpha_ClipMaskType,
|
| - } fCurrClipMaskType;
|
| -
|
| - GrClipMaskCache fAACache; // cache for the AA path
|
| -
|
| // Attempts to install a series of coverage effects to implement the clip. Return indicates
|
| // whether the element list was successfully converted to effects.
|
| bool installClipEffects(const GrReducedClip::ElementList&,
|
| @@ -196,6 +190,20 @@ private:
|
| StencilClipMode mode,
|
| int stencilBitCnt);
|
|
|
| + /**
|
| + * We may represent the clip as a mask in the stencil buffer or as an alpha
|
| + * texture. It may be neither because the scissor rect suffices or we
|
| + * haven't yet examined the clip.
|
| + */
|
| + enum ClipMaskType {
|
| + kNone_ClipMaskType,
|
| + kStencil_ClipMaskType,
|
| + kAlpha_ClipMaskType,
|
| + } fCurrClipMaskType;
|
| +
|
| + GrClipMaskCache fAACache; // cache for the AA path
|
| + GrClipTarget* fClipTarget;
|
| +
|
| typedef SkNoncopyable INHERITED;
|
| };
|
|
|
|
|