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

Unified Diff: src/gpu/GrPathRenderer.h

Issue 1407883004: Remove GrPipelineBuilder from getPathRenderer call (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Hide GrContext::drawingManager entry point Created 5 years, 2 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 | « src/gpu/GrDrawingManager.cpp ('k') | src/gpu/GrPathRendererChain.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrPathRenderer.h
diff --git a/src/gpu/GrPathRenderer.h b/src/gpu/GrPathRenderer.h
index 2390ba0f97058ac96faa916ddce6abc085828a4a..25a2a68abbfb929e808a0f8db092b156a9cd307a 100644
--- a/src/gpu/GrPathRenderer.h
+++ b/src/gpu/GrPathRenderer.h
@@ -10,7 +10,6 @@
#define GrPathRenderer_DEFINED
#include "GrDrawTarget.h"
-#include "GrPathRendererChain.h"
#include "GrStencil.h"
#include "GrStrokeInfo.h"
@@ -51,13 +50,11 @@ public:
* covered by the path.
* 3) kNoSupport: This path renderer cannot be used to stencil the path.
*/
- typedef GrPathRendererChain::StencilSupport StencilSupport;
- static const StencilSupport kNoSupport_StencilSupport =
- GrPathRendererChain::kNoSupport_StencilSupport;
- static const StencilSupport kStencilOnly_StencilSupport =
- GrPathRendererChain::kStencilOnly_StencilSupport;
- static const StencilSupport kNoRestriction_StencilSupport =
- GrPathRendererChain::kNoRestriction_StencilSupport;
+ enum StencilSupport {
+ kNoSupport_StencilSupport,
+ kStencilOnly_StencilSupport,
+ kNoRestriction_StencilSupport,
+ };
/**
* This function is to get the stencil support for a particular path. The path's fill must
@@ -82,15 +79,17 @@ public:
*/
struct CanDrawPathArgs {
const GrShaderCaps* fShaderCaps;
- const GrPipelineBuilder* fPipelineBuilder;// only used by GrStencilAndCoverPathRenderer
const SkMatrix* fViewMatrix;
const SkPath* fPath;
const GrStrokeInfo* fStroke;
bool fAntiAlias;
+ // These next two are only used by GrStencilAndCoverPathRenderer
+ bool fIsStencilDisabled;
+ bool fIsStencilBufferMSAA;
+
void validate() const {
SkASSERT(fShaderCaps);
- SkASSERT(fPipelineBuilder);
SkASSERT(fViewMatrix);
SkASSERT(fPath);
SkASSERT(fStroke);
@@ -151,11 +150,14 @@ public:
#ifdef SK_DEBUG
CanDrawPathArgs canArgs;
canArgs.fShaderCaps = args.fTarget->caps()->shaderCaps();
- canArgs.fPipelineBuilder = args.fPipelineBuilder;
canArgs.fViewMatrix = args.fViewMatrix;
canArgs.fPath = args.fPath;
canArgs.fStroke = args.fStroke;
canArgs.fAntiAlias = args.fAntiAlias;
+
+ canArgs.fIsStencilDisabled = args.fPipelineBuilder->getStencil().isDisabled();
+ canArgs.fIsStencilBufferMSAA =
+ args.fPipelineBuilder->getRenderTarget()->isStencilBufferMultisampled();
SkASSERT(this->canDrawPath(canArgs));
SkASSERT(args.fPipelineBuilder->getStencil().isDisabled() ||
kNoRestriction_StencilSupport == this->getStencilSupport(*args.fPath,
« no previous file with comments | « src/gpu/GrDrawingManager.cpp ('k') | src/gpu/GrPathRendererChain.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698