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

Unified Diff: src/gpu/GrClipMaskManager.h

Issue 1754563003: Begin weaning GrClipMaskManager off of GrDrawTarget (take 2) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix fAuditTrail uses Created 4 years, 10 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 | « include/gpu/GrDrawContext.h ('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 6b9b727161131c7e7fc3e7326f40f5057d866b4d..36354545d525fc0c53d846d942837a2990147aaf 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
« no previous file with comments | « include/gpu/GrDrawContext.h ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698