aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrClipMaskManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrClipMaskManager.h')
-rw-r--r--src/gpu/GrClipMaskManager.h48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/gpu/GrClipMaskManager.h b/src/gpu/GrClipMaskManager.h
index 36354545d5..6b9b727161 100644
--- a/src/gpu/GrClipMaskManager.h
+++ b/src/gpu/GrClipMaskManager.h
@@ -69,12 +69,6 @@ public:
const SkRect* devBounds,
GrAppliedClip*);
- bool setupScissorClip(const GrPipelineBuilder& pipelineBuilder,
- GrPipelineBuilder::AutoRestoreStencil* ars,
- const SkIRect& scissor,
- const SkRect* devBounds,
- GrAppliedClip* out);
-
void adjustPathStencilParams(const GrStencilAttachment*, GrStencilSettings*);
private:
@@ -129,26 +123,32 @@ private:
// Creates an alpha mask of the clip. The mask is a rasterization of elements through the
// rect specified by clipSpaceIBounds.
- static GrTexture* CreateAlphaClipMask(GrContext*,
- int32_t elementsGenID,
- GrReducedClip::InitialState initialState,
- const GrReducedClip::ElementList& elements,
- const SkVector& clipToMaskOffset,
- const SkIRect& clipSpaceIBounds);
+ GrTexture* createAlphaClipMask(int32_t elementsGenID,
+ GrReducedClip::InitialState initialState,
+ const GrReducedClip::ElementList& elements,
+ const SkVector& clipToMaskOffset,
+ const SkIRect& clipSpaceIBounds);
// Similar to createAlphaClipMask but it rasterizes in SW and uploads to the result texture.
- static GrTexture* CreateSoftwareClipMask(GrContext*,
- int32_t elementsGenID,
- GrReducedClip::InitialState initialState,
- const GrReducedClip::ElementList& elements,
- const SkVector& clipToMaskOffset,
- const SkIRect& clipSpaceIBounds);
-
- static bool UseSWOnlyPath(GrContext*,
- const GrPipelineBuilder&,
- const GrRenderTarget* rt,
- const SkVector& clipToMaskOffset,
- const GrReducedClip::ElementList& elements);
+ GrTexture* createSoftwareClipMask(int32_t elementsGenID,
+ GrReducedClip::InitialState initialState,
+ const GrReducedClip::ElementList& elements,
+ const SkVector& clipToMaskOffset,
+ const SkIRect& clipSpaceIBounds);
+
+ bool useSWOnlyPath(const GrPipelineBuilder&,
+ const GrRenderTarget* rt,
+ const SkVector& clipToMaskOffset,
+ const GrReducedClip::ElementList& elements);
+
+ // Draws a clip element into the target alpha mask. The caller should have already setup the
+ // desired blend operation. Optionally if the caller already selected a path renderer it can
+ // be passed. Otherwise the function will select one if the element is a path.
+ bool drawElement(GrPipelineBuilder*,
+ const SkMatrix& viewMatrix,
+ GrTexture* target,
+ const SkClipStack::Element*,
+ GrPathRenderer* pr = nullptr);
/**
* Called prior to return control back the GrGpu in setupClipping. It updates the