From ec46871a0cdb511fc733e459cd42dd6bfe619e39 Mon Sep 17 00:00:00 2001 From: Yuqian Li Date: Mon, 19 Mar 2018 16:43:32 -0400 Subject: [PATCH] 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 Commit-Queue: Yuqian Li --- src/shaders/gradients/SkTwoPointConicalGradient_gpu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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