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

Unified Diff: tests/GLProgramsTest.cpp

Issue 1933053002: Use constexpr constructors of GrStencilSettings rather than hacky macro system (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment Created 4 years, 8 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/text/GrStencilAndCoverTextContext.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/GLProgramsTest.cpp
diff --git a/tests/GLProgramsTest.cpp b/tests/GLProgramsTest.cpp
index 0d825c65517f5b3e274e24951caccafc21f7b034..c5d61d87cbf9ae99049503b1dbff4be1b2b80302 100644
--- a/tests/GLProgramsTest.cpp
+++ b/tests/GLProgramsTest.cpp
@@ -277,20 +277,20 @@ static void set_random_state(GrPipelineBuilder* pipelineBuilder, SkRandom* rando
// right now, the only thing we seem to care about in drawState's stencil is 'doesWrite()'
static void set_random_stencil(GrPipelineBuilder* pipelineBuilder, SkRandom* random) {
- GR_STATIC_CONST_SAME_STENCIL(kDoesWriteStencil,
- kReplace_StencilOp,
- kReplace_StencilOp,
- kAlways_StencilFunc,
- 0xffff,
- 0xffff,
- 0xffff);
- GR_STATIC_CONST_SAME_STENCIL(kDoesNotWriteStencil,
- kKeep_StencilOp,
- kKeep_StencilOp,
- kNever_StencilFunc,
- 0xffff,
- 0xffff,
- 0xffff);
+ static constexpr GrStencilSettings kDoesWriteStencil(
+ kReplace_StencilOp,
+ kReplace_StencilOp,
+ kAlways_StencilFunc,
+ 0xffff,
+ 0xffff,
+ 0xffff);
+ static constexpr GrStencilSettings kDoesNotWriteStencil(
+ kKeep_StencilOp,
+ kKeep_StencilOp,
+ kNever_StencilFunc,
+ 0xffff,
+ 0xffff,
+ 0xffff);
if (random->nextBool()) {
pipelineBuilder->setStencil(kDoesWriteStencil);
« no previous file with comments | « src/gpu/text/GrStencilAndCoverTextContext.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698