aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrClipMaskManager.h
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-03-02 08:43:13 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-02 08:43:13 -0800
commit86c60758e9e4f9e203d7462cb22b2a245a0f51bd (patch)
tree0cc77d90e91bf61a381878afbdce7022b89524ff /src/gpu/GrClipMaskManager.h
parent46b301d2222b60dd5ab495b917dea163e8be94ef (diff)
Begin weaning GrClipMaskManager off of GrDrawTarget (take 2)
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 6b9b727161..36354545d5 100644
--- a/src/gpu/GrClipMaskManager.h
+++ b/src/gpu/GrClipMaskManager.h
@@ -69,6 +69,12 @@ 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:
@@ -123,32 +129,26 @@ private:
// Creates an alpha mask of the clip. The mask is a rasterization of elements through the
// rect specified by clipSpaceIBounds.
- GrTexture* createAlphaClipMask(int32_t elementsGenID,
- GrReducedClip::InitialState initialState,
- const GrReducedClip::ElementList& elements,
- const SkVector& clipToMaskOffset,
- const SkIRect& clipSpaceIBounds);
+ static GrTexture* CreateAlphaClipMask(GrContext*,
+ 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.
- 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);
+ 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);
/**
* Called prior to return control back the GrGpu in setupClipping. It updates the