aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/shaders
diff options
context:
space:
mode:
authorGravatar Yuqian Li <liyuqian@google.com>2018-03-19 16:43:32 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-19 22:46:46 +0000
commitec46871a0cdb511fc733e459cd42dd6bfe619e39 (patch)
tree3dd3e666ee8ce2d6bcb39a4962d40950f65fc10c /src/shaders
parent3b68882918e30e87a46b833ed5e6d8b231f638e0 (diff)
Make consistent isRadiusIncreasing decision
This should not affect anything for now. But it may prevent some future problems where someone accidentally changed isRadiusIncreasing implementation, and getting confused by the unexpected shading behavior. Bug: skia: Change-Id: I45e83f4bc9eefbdc1ad1c196a43444e24c782711 Reviewed-on: https://skia-review.googlesource.com/115162 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
Diffstat (limited to 'src/shaders')
-rw-r--r--src/shaders/gradients/SkTwoPointConicalGradient_gpu.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shaders/gradients/SkTwoPointConicalGradient_gpu.cpp b/src/shaders/gradients/SkTwoPointConicalGradient_gpu.cpp
index 6956fa22aa..c242895f1c 100644
--- a/src/shaders/gradients/SkTwoPointConicalGradient_gpu.cpp
+++ b/src/shaders/gradients/SkTwoPointConicalGradient_gpu.cpp
@@ -239,7 +239,7 @@ protected:
const char* p = coords2D.c_str();
if (effect.getType() == Type::kRadial) {
- char sign = effect.diffRadius() < 0 ? '-' : '+';
+ char sign = effect.isRadiusIncreasing() ? '+' : '-';
fragBuilder->codeAppendf("half %s = %clength(%s) - %s;", tName, sign, p, p0.c_str());
} else {
// output will default to transparent black (we simply won't write anything