diff options
author | Ethan Nicholas <ethannicholas@google.com> | 2017-11-20 12:12:24 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-11-20 20:34:38 +0000 |
commit | e9d172af84fff5d76e19180a0c2b7b3cc51e90a2 (patch) | |
tree | 115bce6c41c0e7fada2f45de6e7b5e90b464e00a /src/gpu | |
parent | 53d863c18cd3b53d8b4c4dcb8505f2c52f1e5c59 (diff) |
converted ConstColorProcessor to SkSL
Bug: skia:
Change-Id: Ic3b18f82c1ab940637fb26dec1cf376dd859b35d
Reviewed-on: https://skia-review.googlesource.com/73720
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/GrFragmentProcessor.cpp | 2 | ||||
-rw-r--r-- | src/gpu/SkGr.cpp | 6 | ||||
-rw-r--r-- | src/gpu/effects/GrAARectEffect.cpp | 2 | ||||
-rw-r--r-- | src/gpu/effects/GrCircleEffect.cpp | 4 | ||||
-rw-r--r-- | src/gpu/effects/GrConstColorProcessor.cpp | 141 | ||||
-rw-r--r-- | src/gpu/effects/GrConstColorProcessor.fp | 91 | ||||
-rw-r--r-- | src/gpu/effects/GrConstColorProcessor.h | 91 | ||||
-rw-r--r-- | src/gpu/effects/GrConvexPolyEffect.cpp | 4 | ||||
-rw-r--r-- | src/gpu/effects/GrEllipseEffect.cpp | 6 | ||||
-rw-r--r-- | src/gpu/effects/GrRectBlurEffect.cpp | 2 | ||||
-rw-r--r-- | src/gpu/effects/GrXfermodeFragmentProcessor.cpp | 6 |
11 files changed, 210 insertions, 145 deletions
diff --git a/src/gpu/GrFragmentProcessor.cpp b/src/gpu/GrFragmentProcessor.cpp index a50be79872..0c7c06fd6a 100644 --- a/src/gpu/GrFragmentProcessor.cpp +++ b/src/gpu/GrFragmentProcessor.cpp @@ -450,7 +450,7 @@ std::unique_ptr<GrFragmentProcessor> GrFragmentProcessor::RunInSeries( int leadingFPsToEliminate = info.initialProcessorsToEliminate(&knownColor); if (leadingFPsToEliminate) { std::unique_ptr<GrFragmentProcessor> colorFP( - GrConstColorProcessor::Make(knownColor, GrConstColorProcessor::kIgnore_InputMode)); + GrConstColorProcessor::Make(knownColor, GrConstColorProcessor::InputMode::kIgnore)); if (leadingFPsToEliminate == cnt) { return colorFP; } diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp index 684d4d7368..def99c33ba 100644 --- a/src/gpu/SkGr.cpp +++ b/src/gpu/SkGr.cpp @@ -479,7 +479,7 @@ static inline bool skpaint_to_grpaint_impl(GrContext* context, // color channels. It's value should be treated as the same in ANY color space. grPaint->addColorFragmentProcessor(GrConstColorProcessor::Make( GrColor4f::FromGrColor(paintAlpha), - GrConstColorProcessor::kModulateRGBA_InputMode)); + GrConstColorProcessor::InputMode::kModulateRGBA)); } } else { // The shader's FP sees the paint unpremul color @@ -491,7 +491,7 @@ static inline bool skpaint_to_grpaint_impl(GrContext* context, // There is a blend between the primitive color and the paint color. The blend considers // the opaque paint color. The paint's alpha is applied to the post-blended color. auto processor = GrConstColorProcessor::Make(origColor.opaque(), - GrConstColorProcessor::kIgnore_InputMode); + GrConstColorProcessor::InputMode::kIgnore); processor = GrXfermodeFragmentProcessor::MakeFromSrcProcessor(std::move(processor), *primColorMode); if (processor) { @@ -507,7 +507,7 @@ static inline bool skpaint_to_grpaint_impl(GrContext* context, // color channels. It's value should be treated as the same in ANY color space. grPaint->addColorFragmentProcessor(GrConstColorProcessor::Make( GrColor4f::FromGrColor(paintAlpha), - GrConstColorProcessor::kModulateRGBA_InputMode)); + GrConstColorProcessor::InputMode::kModulateRGBA)); } } else { // No shader, no primitive color. diff --git a/src/gpu/effects/GrAARectEffect.cpp b/src/gpu/effects/GrAARectEffect.cpp index fcc54dc261..0e49e0fad8 100644 --- a/src/gpu/effects/GrAARectEffect.cpp +++ b/src/gpu/effects/GrAARectEffect.cpp @@ -74,7 +74,7 @@ private: prevRect = newRect; } } - SkRect prevRect; + SkRect prevRect = float4(0); UniformHandle fRectUniformVar; }; GrGLSLFragmentProcessor* GrAARectEffect::onCreateGLSLInstance() const { diff --git a/src/gpu/effects/GrCircleEffect.cpp b/src/gpu/effects/GrCircleEffect.cpp index d3eecb7899..3bd2138e94 100644 --- a/src/gpu/effects/GrCircleEffect.cpp +++ b/src/gpu/effects/GrCircleEffect.cpp @@ -75,8 +75,8 @@ private: prevRadius = radius; } } - SkPoint prevCenter; - float prevRadius; + SkPoint prevCenter = half2(0); + float prevRadius = 0; UniformHandle fCircleVar; }; GrGLSLFragmentProcessor* GrCircleEffect::onCreateGLSLInstance() const { diff --git a/src/gpu/effects/GrConstColorProcessor.cpp b/src/gpu/effects/GrConstColorProcessor.cpp index 7051872bf3..b2ac82568b 100644 --- a/src/gpu/effects/GrConstColorProcessor.cpp +++ b/src/gpu/effects/GrConstColorProcessor.cpp @@ -1,102 +1,88 @@ /* - * Copyright 2015 Google Inc. + * Copyright 2017 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#include "effects/GrConstColorProcessor.h" +/* + * This file was autogenerated from GrConstColorProcessor.fp; do not modify. + */ +#include "GrConstColorProcessor.h" +#if SK_SUPPORT_GPU #include "glsl/GrGLSLFragmentProcessor.h" #include "glsl/GrGLSLFragmentShaderBuilder.h" -#include "glsl/GrGLSLProgramDataManager.h" -#include "glsl/GrGLSLUniformHandler.h" - -class GLConstColorProcessor : public GrGLSLFragmentProcessor { +#include "glsl/GrGLSLProgramBuilder.h" +#include "SkSLCPP.h" +#include "SkSLUtil.h" +class GrGLSLConstColorProcessor : public GrGLSLFragmentProcessor { public: - GLConstColorProcessor() : fPrevColor(GrColor4f::kIllegalConstructor) {} - + GrGLSLConstColorProcessor() {} void emitCode(EmitArgs& args) override { GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder; - const char* colorUni; - fColorUniform = args.fUniformHandler->addUniform(kFragment_GrShaderFlag, - kHalf4_GrSLType, - "constantColor", - &colorUni); - GrConstColorProcessor::InputMode mode = args.fFp.cast<GrConstColorProcessor>().inputMode(); - if (!args.fInputColor) { - mode = GrConstColorProcessor::kIgnore_InputMode; - } - switch (mode) { - case GrConstColorProcessor::kIgnore_InputMode: - fragBuilder->codeAppendf("%s = %s;", args.fOutputColor, colorUni); - break; - case GrConstColorProcessor::kModulateRGBA_InputMode: - fragBuilder->codeAppendf("%s = %s * %s;", args.fOutputColor, args.fInputColor, - colorUni); - break; - case GrConstColorProcessor::kModulateA_InputMode: - fragBuilder->codeAppendf("%s = %s.a * %s;", args.fOutputColor, args.fInputColor, - colorUni); - break; - } + const GrConstColorProcessor& _outer = args.fFp.cast<GrConstColorProcessor>(); + (void)_outer; + auto color = _outer.color(); + (void)color; + auto mode = _outer.mode(); + (void)mode; + fColorUniformVar = args.fUniformHandler->addUniform(kFragment_GrShaderFlag, kHalf4_GrSLType, + kDefault_GrSLPrecision, "colorUniform"); + fragBuilder->codeAppendf( + "half4 prevColor;\n@switch (%d) {\n case 0:\n %s = %s;\n break;\n " + " case 1:\n %s = %s * %s;\n break;\n case 2:\n %s = %s.w " + "* %s;\n break;\n}\n", + (int)_outer.mode(), args.fOutputColor, + args.fUniformHandler->getUniformCStr(fColorUniformVar), args.fOutputColor, + args.fInputColor ? args.fInputColor : "half4(1)", + args.fUniformHandler->getUniformCStr(fColorUniformVar), args.fOutputColor, + args.fInputColor ? args.fInputColor : "half4(1)", + args.fUniformHandler->getUniformCStr(fColorUniformVar)); } -protected: - void onSetData(const GrGLSLProgramDataManager& pdm, - const GrFragmentProcessor& processor) override { - GrColor4f color = processor.cast<GrConstColorProcessor>().color(); +private: + void onSetData(const GrGLSLProgramDataManager& pdman, + const GrFragmentProcessor& _proc) override { + const GrConstColorProcessor& _outer = _proc.cast<GrConstColorProcessor>(); + auto color = _outer.color(); + (void)color; + UniformHandle& colorUniform = fColorUniformVar; + (void)colorUniform; + auto mode = _outer.mode(); + (void)mode; + // We use the "illegal" color value as an uninit sentinel. With GrColor4f, the "illegal" // color is *really* illegal (not just unpremultiplied), so this check is simple. - if (fPrevColor != color) { - pdm.set4fv(fColorUniform, 1, color.fRGBA); - fPrevColor = color; + if (prevColor != color) { + pdman.set4fv(colorUniform, 1, color.fRGBA); + prevColor = color; } } - -private: - GrGLSLProgramDataManager::UniformHandle fColorUniform; - GrColor4f fPrevColor; - - typedef GrGLSLFragmentProcessor INHERITED; + GrColor4f prevColor = GrColor4f::kIllegalConstructor; + UniformHandle fColorUniformVar; }; - -/////////////////////////////////////////////////////////////////////////////// - -std::unique_ptr<GrFragmentProcessor> GrConstColorProcessor::clone() const { - return Make(fColor, fMode); +GrGLSLFragmentProcessor* GrConstColorProcessor::onCreateGLSLInstance() const { + return new GrGLSLConstColorProcessor(); } - -GrColor4f GrConstColorProcessor::constantOutputForConstantInput(GrColor4f input) const { - switch (fMode) { - case kIgnore_InputMode: - return fColor; - case kModulateA_InputMode: - return fColor.mulByScalar(input.fRGBA[3]); - case kModulateRGBA_InputMode: - return fColor.modulate(input); - } - SK_ABORT("Unexpected mode"); - return GrColor4f::TransparentBlack(); -} - -void GrConstColorProcessor::onGetGLSLProcessorKey(const GrShaderCaps&, +void GrConstColorProcessor::onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const { - b->add32(fMode); + b->add32((int32_t)fMode); } - -GrGLSLFragmentProcessor* GrConstColorProcessor::onCreateGLSLInstance() const { - return new GLConstColorProcessor; -} - bool GrConstColorProcessor::onIsEqual(const GrFragmentProcessor& other) const { const GrConstColorProcessor& that = other.cast<GrConstColorProcessor>(); - return fMode == that.fMode && fColor == that.fColor; + (void)that; + if (fColor != that.fColor) return false; + if (fMode != that.fMode) return false; + return true; +} +GrConstColorProcessor::GrConstColorProcessor(const GrConstColorProcessor& src) + : INHERITED(kGrConstColorProcessor_ClassID, src.optimizationFlags()) + , fColor(src.fColor) + , fMode(src.fMode) {} +std::unique_ptr<GrFragmentProcessor> GrConstColorProcessor::clone() const { + return std::unique_ptr<GrFragmentProcessor>(new GrConstColorProcessor(*this)); } - -/////////////////////////////////////////////////////////////////////////////// - GR_DEFINE_FRAGMENT_PROCESSOR_TEST(GrConstColorProcessor); - #if GR_TEST_UTILS std::unique_ptr<GrFragmentProcessor> GrConstColorProcessor::TestCreate(GrProcessorTestData* d) { GrColor4f color; @@ -104,9 +90,9 @@ std::unique_ptr<GrFragmentProcessor> GrConstColorProcessor::TestCreate(GrProcess switch (colorPicker) { case 0: { uint32_t a = d->fRandom->nextULessThan(0x100); - uint32_t r = d->fRandom->nextULessThan(a+1); - uint32_t g = d->fRandom->nextULessThan(a+1); - uint32_t b = d->fRandom->nextULessThan(a+1); + uint32_t r = d->fRandom->nextULessThan(a + 1); + uint32_t g = d->fRandom->nextULessThan(a + 1); + uint32_t b = d->fRandom->nextULessThan(a + 1); color = GrColor4f::FromGrColor(GrColorPackRGBA(r, g, b, a)); break; } @@ -122,3 +108,4 @@ std::unique_ptr<GrFragmentProcessor> GrConstColorProcessor::TestCreate(GrProcess return GrConstColorProcessor::Make(color, mode); } #endif +#endif diff --git a/src/gpu/effects/GrConstColorProcessor.fp b/src/gpu/effects/GrConstColorProcessor.fp new file mode 100644 index 0000000000..d7db4f047c --- /dev/null +++ b/src/gpu/effects/GrConstColorProcessor.fp @@ -0,0 +1,91 @@ +enum class InputMode { + kIgnore, + kModulateRGBA, + kModulateA, + + kLast = kModulateA +}; + +layout(ctype=GrColor4f) in half4 color; +uniform half4 colorUniform; +layout(ctype=GrColor4f) half4 prevColor; +layout(key) in InputMode mode; + +@optimizationFlags { + OptFlags(color, mode) +} + +void main() { + @switch (mode) { + case InputMode::kIgnore: + sk_OutColor = colorUniform; + break; + case InputMode::kModulateRGBA: + sk_OutColor = sk_InColor * colorUniform; + break; + case InputMode::kModulateA: + sk_OutColor = sk_InColor.a * colorUniform; + break; + } +} + +@setData(pdman) { + // We use the "illegal" color value as an uninit sentinel. With GrColor4f, the "illegal" + // color is *really* illegal (not just unpremultiplied), so this check is simple. + if (prevColor != color) { + pdman.set4fv(colorUniform, 1, color.fRGBA); + prevColor = color; + } +} + +@class { + static const int kInputModeCnt = (int) InputMode::kLast + 1; + + static OptimizationFlags OptFlags(GrColor4f color, InputMode mode) { + OptimizationFlags flags = kConstantOutputForConstantInput_OptimizationFlag; + if (mode != InputMode::kIgnore) { + flags |= kCompatibleWithCoverageAsAlpha_OptimizationFlag; + } + if (color.isOpaque()) { + flags |= kPreservesOpaqueInput_OptimizationFlag; + } + return flags; + } + + GrColor4f constantOutputForConstantInput(GrColor4f input) const override { + switch (fMode) { + case InputMode::kIgnore: + return fColor; + case InputMode::kModulateA: + return fColor.mulByScalar(input.fRGBA[3]); + case InputMode::kModulateRGBA: + return fColor.modulate(input); + } + SK_ABORT("Unexpected mode"); + return GrColor4f::TransparentBlack(); + } +} + +@test(d) { + GrColor4f color; + int colorPicker = d->fRandom->nextULessThan(3); + switch (colorPicker) { + case 0: { + uint32_t a = d->fRandom->nextULessThan(0x100); + uint32_t r = d->fRandom->nextULessThan(a+1); + uint32_t g = d->fRandom->nextULessThan(a+1); + uint32_t b = d->fRandom->nextULessThan(a+1); + color = GrColor4f::FromGrColor(GrColorPackRGBA(r, g, b, a)); + break; + } + case 1: + color = GrColor4f::TransparentBlack(); + break; + case 2: + uint32_t c = d->fRandom->nextULessThan(0x100); + color = GrColor4f::FromGrColor(c | (c << 8) | (c << 16) | (c << 24)); + break; + } + InputMode mode = static_cast<InputMode>(d->fRandom->nextULessThan(kInputModeCnt)); + return GrConstColorProcessor::Make(color, mode); +}
\ No newline at end of file diff --git a/src/gpu/effects/GrConstColorProcessor.h b/src/gpu/effects/GrConstColorProcessor.h index 1429e9ba77..62a9a0c5ef 100644 --- a/src/gpu/effects/GrConstColorProcessor.h +++ b/src/gpu/effects/GrConstColorProcessor.h @@ -1,53 +1,28 @@ /* - * Copyright 2015 Google Inc. + * Copyright 2017 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -#ifndef GrColorProcessor_DEFINED -#define GrColorProcessor_DEFINED - -#include "GrFragmentProcessor.h" - -/** - * This is a simple GrFragmentProcessor that outputs a constant color. It may do one of the - * following with its input color: ignore it, or multiply it by the constant color, multiply its - * alpha by the constant color and ignore the input color's r, g, and b. +/* + * This file was autogenerated from GrConstColorProcessor.fp; do not modify. */ +#ifndef GrConstColorProcessor_DEFINED +#define GrConstColorProcessor_DEFINED +#include "SkTypes.h" +#if SK_SUPPORT_GPU +#include "GrFragmentProcessor.h" +#include "GrCoordTransform.h" class GrConstColorProcessor : public GrFragmentProcessor { public: - enum InputMode { - kIgnore_InputMode, - kModulateRGBA_InputMode, - kModulateA_InputMode, - - kLastInputMode = kModulateA_InputMode - }; - static const int kInputModeCnt = kLastInputMode + 1; - - static std::unique_ptr<GrFragmentProcessor> Make(GrColor4f color, InputMode mode) { - return std::unique_ptr<GrFragmentProcessor>(new GrConstColorProcessor(color, mode)); - } + enum class InputMode { kLast = 2, kModulateA = 2, kModulateRGBA = 1, kIgnore = 0 }; - const char* name() const override { return "Color"; } + static const int kInputModeCnt = (int)InputMode::kLast + 1; - SkString dumpInfo() const override { - SkString str; - str.appendf("Color: 0x%08x", fColor.toGrColor()); - return str; - } - - std::unique_ptr<GrFragmentProcessor> clone() const override; - - GrColor4f color() const { return fColor; } - - InputMode inputMode() const { return fMode; } - -private: static OptimizationFlags OptFlags(GrColor4f color, InputMode mode) { OptimizationFlags flags = kConstantOutputForConstantInput_OptimizationFlag; - if (mode != kIgnore_InputMode) { + if (mode != InputMode::kIgnore) { flags |= kCompatibleWithCoverageAsAlpha_OptimizationFlag; } if (color.isOpaque()) { @@ -56,27 +31,39 @@ private: return flags; } - GrConstColorProcessor(GrColor4f color, InputMode mode) - : INHERITED(kGrConstColorProcessor_ClassID - , OptFlags(color, mode)) - , fColor(color) - , fMode(mode) { + GrColor4f constantOutputForConstantInput(GrColor4f input) const override { + switch (fMode) { + case InputMode::kIgnore: + return fColor; + case InputMode::kModulateA: + return fColor.mulByScalar(input.fRGBA[3]); + case InputMode::kModulateRGBA: + return fColor.modulate(input); + } + SK_ABORT("Unexpected mode"); + return GrColor4f::TransparentBlack(); } + GrColor4f color() const { return fColor; } + InputMode mode() const { return fMode; } + static std::unique_ptr<GrFragmentProcessor> Make(GrColor4f color, InputMode mode) { + return std::unique_ptr<GrFragmentProcessor>(new GrConstColorProcessor(color, mode)); + } + GrConstColorProcessor(const GrConstColorProcessor& src); + std::unique_ptr<GrFragmentProcessor> clone() const override; + const char* name() const override { return "ConstColorProcessor"; } +private: + GrConstColorProcessor(GrColor4f color, InputMode mode) + : INHERITED(kGrConstColorProcessor_ClassID, (OptimizationFlags)OptFlags(color, mode)) + , fColor(color) + , fMode(mode) {} GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; - void onGetGLSLProcessorKey(const GrShaderCaps&, GrProcessorKeyBuilder*) const override; - bool onIsEqual(const GrFragmentProcessor&) const override; - - GrColor4f constantOutputForConstantInput(GrColor4f input) const override; - GR_DECLARE_FRAGMENT_PROCESSOR_TEST - - GrColor4f fColor; - InputMode fMode; - + GrColor4f fColor; + InputMode fMode; typedef GrFragmentProcessor INHERITED; }; - +#endif #endif diff --git a/src/gpu/effects/GrConvexPolyEffect.cpp b/src/gpu/effects/GrConvexPolyEffect.cpp index 6df92eef15..753d34ee7e 100644 --- a/src/gpu/effects/GrConvexPolyEffect.cpp +++ b/src/gpu/effects/GrConvexPolyEffect.cpp @@ -105,14 +105,14 @@ std::unique_ptr<GrFragmentProcessor> GrConvexPolyEffect::Make(GrClipEdgeType typ if (!SkPathPriv::CheapComputeFirstDirection(path, &dir)) { if (GrProcessorEdgeTypeIsInverseFill(type)) { return GrConstColorProcessor::Make(GrColor4f::OpaqueWhite(), - GrConstColorProcessor::kModulateRGBA_InputMode); + GrConstColorProcessor::InputMode::kModulateRGBA); } // This could use kIgnore instead of kModulateRGBA but it would trigger a debug print // about a coverage processor not being compatible with the alpha-as-coverage optimization. // We don't really care about this unlikely case so we just use kModulateRGBA to suppress // the print. return GrConstColorProcessor::Make(GrColor4f::TransparentBlack(), - GrConstColorProcessor::kModulateRGBA_InputMode); + GrConstColorProcessor::InputMode::kModulateRGBA); } SkScalar edges[3 * kMaxEdges]; diff --git a/src/gpu/effects/GrEllipseEffect.cpp b/src/gpu/effects/GrEllipseEffect.cpp index 6b1a8cc59f..b41af395d4 100644 --- a/src/gpu/effects/GrEllipseEffect.cpp +++ b/src/gpu/effects/GrEllipseEffect.cpp @@ -98,9 +98,9 @@ private: prevRadii = radii; } } - SkPoint prevCenter; - SkPoint prevRadii; - bool useScale; + SkPoint prevCenter = float2(0); + SkPoint prevRadii = float2(0); + bool useScale = false; UniformHandle fEllipseVar; UniformHandle fScaleVar; }; diff --git a/src/gpu/effects/GrRectBlurEffect.cpp b/src/gpu/effects/GrRectBlurEffect.cpp index 940674e9bc..573c1313a0 100644 --- a/src/gpu/effects/GrRectBlurEffect.cpp +++ b/src/gpu/effects/GrRectBlurEffect.cpp @@ -124,7 +124,7 @@ private: pdman.set1f(profileSize, SkScalarCeilToScalar(6 * sigma)); } - bool highPrecision; + bool highPrecision = false; UniformHandle fProxyRectHalfVar; UniformHandle fProxyRectFloatVar; UniformHandle fProfileSizeVar; diff --git a/src/gpu/effects/GrXfermodeFragmentProcessor.cpp b/src/gpu/effects/GrXfermodeFragmentProcessor.cpp index 4a92289c7d..6b764f453a 100644 --- a/src/gpu/effects/GrXfermodeFragmentProcessor.cpp +++ b/src/gpu/effects/GrXfermodeFragmentProcessor.cpp @@ -249,7 +249,7 @@ std::unique_ptr<GrFragmentProcessor> GrXfermodeFragmentProcessor::MakeFromTwoPro switch (mode) { case SkBlendMode::kClear: return GrConstColorProcessor::Make(GrColor4f::TransparentBlack(), - GrConstColorProcessor::kIgnore_InputMode); + GrConstColorProcessor::InputMode::kIgnore); case SkBlendMode::kSrc: return src; case SkBlendMode::kDst: @@ -516,7 +516,7 @@ std::unique_ptr<GrFragmentProcessor> GrXfermodeFragmentProcessor::MakeFromDstPro switch (mode) { case SkBlendMode::kClear: return GrConstColorProcessor::Make(GrColor4f::TransparentBlack(), - GrConstColorProcessor::kIgnore_InputMode); + GrConstColorProcessor::InputMode::kIgnore); case SkBlendMode::kSrc: return nullptr; default: @@ -530,7 +530,7 @@ std::unique_ptr<GrFragmentProcessor> GrXfermodeFragmentProcessor::MakeFromSrcPro switch (mode) { case SkBlendMode::kClear: return GrConstColorProcessor::Make(GrColor4f::TransparentBlack(), - GrConstColorProcessor::kIgnore_InputMode); + GrConstColorProcessor::InputMode::kIgnore); case SkBlendMode::kDst: return nullptr; default: |