aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects/GrBlurredEdgeFragmentProcessor.cpp
diff options
context:
space:
mode:
authorGravatar Ethan Nicholas <ethannicholas@google.com>2017-11-10 15:34:03 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-11-13 14:36:40 +0000
commitaae47c878b83ab6d9742d92a6fa47e762f6b9204 (patch)
treefd13dbc1dc7c5dc36f8262099cf8ade55ec0cb47 /src/gpu/effects/GrBlurredEdgeFragmentProcessor.cpp
parent2d9cb57c83553be3434c04f860d5e9fec30cb453 (diff)
sksl enum support
Bug: skia: Change-Id: I4d505b31cf8b59de12bcdbca410aafc085977ba9 Reviewed-on: https://skia-review.googlesource.com/68621 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Diffstat (limited to 'src/gpu/effects/GrBlurredEdgeFragmentProcessor.cpp')
-rw-r--r--src/gpu/effects/GrBlurredEdgeFragmentProcessor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gpu/effects/GrBlurredEdgeFragmentProcessor.cpp b/src/gpu/effects/GrBlurredEdgeFragmentProcessor.cpp
index 80e2d37f62..6dfb6c5216 100644
--- a/src/gpu/effects/GrBlurredEdgeFragmentProcessor.cpp
+++ b/src/gpu/effects/GrBlurredEdgeFragmentProcessor.cpp
@@ -31,7 +31,8 @@ public:
"0.017999999999999999);\n break;\n case 1:\n factor = "
"half(smoothstep(1.0, 0.0, float(factor)));\n break;\n}\n%s = "
"half4(factor);\n",
- args.fInputColor ? args.fInputColor : "half4(1)", _outer.mode(), args.fOutputColor);
+ args.fInputColor ? args.fInputColor : "half4(1)", (int)_outer.mode(),
+ args.fOutputColor);
}
private:
@@ -43,7 +44,7 @@ GrGLSLFragmentProcessor* GrBlurredEdgeFragmentProcessor::onCreateGLSLInstance()
}
void GrBlurredEdgeFragmentProcessor::onGetGLSLProcessorKey(const GrShaderCaps& caps,
GrProcessorKeyBuilder* b) const {
- b->add32(fMode);
+ b->add32((int32_t)fMode);
}
bool GrBlurredEdgeFragmentProcessor::onIsEqual(const GrFragmentProcessor& other) const {
const GrBlurredEdgeFragmentProcessor& that = other.cast<GrBlurredEdgeFragmentProcessor>();