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

Unified Diff: src/gpu/GrPathRenderer.h

Issue 1969693003: Revert of 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 | « src/gpu/GrGpu.h ('k') | src/gpu/GrPipeline.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 a7609db658d956e1b8de1dfa540c6f138d12d4e6..3bc02306e63f7e8b83faf2313db5bf5ca8eda8b9 100644
--- a/src/gpu/GrPathRenderer.h
+++ b/src/gpu/GrPathRenderer.h
@@ -9,6 +9,7 @@
#define GrPathRenderer_DEFINED
#include "GrDrawTarget.h"
+#include "GrStencil.h"
#include "GrStyle.h"
#include "SkDrawProcs.h"
@@ -81,7 +82,7 @@
bool fAntiAlias;
// These next two are only used by GrStencilAndCoverPathRenderer
- bool fHasUserStencilSettings;
+ bool fIsStencilDisabled;
bool fIsStencilBufferMSAA;
void validate() const {
@@ -154,11 +155,11 @@
canArgs.fStyle = args.fStyle;
canArgs.fAntiAlias = args.fAntiAlias;
- canArgs.fHasUserStencilSettings = args.fPipelineBuilder->hasUserStencilSettings();
+ canArgs.fIsStencilDisabled = args.fPipelineBuilder->getStencil().isDisabled();
canArgs.fIsStencilBufferMSAA =
args.fPipelineBuilder->getRenderTarget()->isStencilBufferMultisampled();
SkASSERT(this->canDrawPath(canArgs));
- if (args.fPipelineBuilder->hasUserStencilSettings()) {
+ if (!args.fPipelineBuilder->getStencil().isDisabled()) {
SkASSERT(kNoRestriction_StencilSupport == this->getStencilSupport(*args.fPath));
SkASSERT(args.fStyle->isSimpleFill());
}
@@ -259,16 +260,14 @@
* kStencilOnly in onGetStencilSupport().
*/
virtual void onStencilPath(const StencilPathArgs& args) {
- static constexpr GrUserStencilSettings kIncrementStencil(
- GrUserStencilSettings::StaticInit<
- 0xffff,
- GrUserStencilTest::kAlways,
- 0xffff,
- GrUserStencilOp::kReplace,
- GrUserStencilOp::kReplace,
- 0xffff>()
- );
- args.fPipelineBuilder->setUserStencil(&kIncrementStencil);
+ static constexpr GrStencilSettings kIncrementStencil(
+ kReplace_StencilOp,
+ kReplace_StencilOp,
+ kAlways_StencilFunc,
+ 0xffff,
+ 0xffff,
+ 0xffff);
+ args.fPipelineBuilder->setStencil(kIncrementStencil);
args.fPipelineBuilder->setDisableColorXPFactory();
DrawPathArgs drawArgs;
drawArgs.fTarget = args.fTarget;
« no previous file with comments | « src/gpu/GrGpu.h ('k') | src/gpu/GrPipeline.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698