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

Unified Diff: src/gpu/GrClipMaskManager.h

Issue 1962243002: Separate user and raw stencil settings (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 | « gyp/gpu.gypi ('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 ef0c2be040ce4cd97a5ecc56404c7bd55c5b7467..096dafd2e575ab743c40d3b7adc50eeb7b227a6f 100644
--- a/src/gpu/GrClipMaskManager.h
+++ b/src/gpu/GrClipMaskManager.h
@@ -9,7 +9,6 @@
#include "GrPipelineBuilder.h"
#include "GrReducedClip.h"
-#include "GrStencil.h"
#include "GrTexture.h"
#include "SkClipStack.h"
#include "SkDeque.h"
@@ -33,13 +32,15 @@ class SkPath;
*/
class GrAppliedClip : public SkNoncopyable {
public:
- GrAppliedClip() {}
+ GrAppliedClip() : fHasStencilClip(false) {}
const GrFragmentProcessor* clipCoverageFragmentProcessor() const { return fClipCoverageFP; }
const GrScissorState& scissorState() const { return fScissorState; }
+ bool hasStencilClip() const { return fHasStencilClip; }
private:
SkAutoTUnref<const GrFragmentProcessor> fClipCoverageFP;
GrScissorState fScissorState;
+ bool fHasStencilClip;
friend class GrClipMaskManager;
typedef SkNoncopyable INHERITED;
@@ -60,30 +61,23 @@ public:
/**
* Creates a clip mask if necessary as a stencil buffer or alpha texture
* and sets the GrGpu's scissor and stencil state. If the return is false
- * then the draw can be skipped. The AutoRestoreEffects is initialized by
- * the manager when it must install additional effects to implement the
- * clip. devBounds is optional but can help optimize clipping.
+ * then the draw can be skipped. devBounds is optional but can help optimize
+ * clipping.
*/
- bool setupClipping(const GrPipelineBuilder&,
- GrPipelineBuilder::AutoRestoreStencil*,
- const SkRect* devBounds,
- GrAppliedClip*);
+ bool setupClipping(const GrPipelineBuilder&, 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:
inline GrContext* getContext();
inline const GrCaps* caps() const;
inline GrResourceProvider* resourceProvider();
static bool PathNeedsSWRenderer(GrContext* context,
- bool isStencilDisabled,
+ bool hasUserStencilSettings,
const GrRenderTarget* rt,
const SkMatrix& viewMatrix,
const SkClipStack::Element* element,
@@ -150,21 +144,6 @@ private:
const SkVector& clipToMaskOffset,
const GrReducedClip::ElementList& elements);
- /**
- * Called prior to return control back the GrGpu in setupClipping. It updates the
- * GrPipelineBuilder with stencil settings that account for stencil-based clipping.
- */
- void setPipelineBuilderStencil(const GrPipelineBuilder&,
- GrPipelineBuilder::AutoRestoreStencil*);
-
- /**
- * Adjusts the stencil settings to account for interaction with stencil
- * clipping.
- */
- void adjustStencilParams(GrStencilSettings* settings,
- StencilClipMode mode,
- int stencilBitCnt);
-
GrTexture* createCachedMask(int width, int height, const GrUniqueKey& key, bool renderTarget);
static const int kMaxAnalyticElements = 4;
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698