aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/LightingBench.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-02-14 10:59:19 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-14 19:45:24 +0000
commitdf85c38163245c7fc3c23cad3a4ad104949f3a62 (patch)
tree9f56ae6ce07ee9ae6a87e2bd2c52ee787fee7b32 /bench/LightingBench.cpp
parent78c0c4c5a0bed8ac54542d2d378a0fc9ec8c034b (diff)
stop using SkScalarMul
BUG=skia: Change-Id: Ie41d8665a1c62ba8eddc93d8cfefaf64ddc52ff8 Reviewed-on: https://skia-review.googlesource.com/8411 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'bench/LightingBench.cpp')
-rw-r--r--bench/LightingBench.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/bench/LightingBench.cpp b/bench/LightingBench.cpp
index bbe0af343c..a924f4a9ce 100644
--- a/bench/LightingBench.cpp
+++ b/bench/LightingBench.cpp
@@ -37,11 +37,10 @@ protected:
static SkPoint3 GetDistantDirection() {
static SkScalar azimuthRad = SkDegreesToRadians(SkIntToScalar(225));
static SkScalar elevationRad = SkDegreesToRadians(SkIntToScalar(5));
- static SkPoint3 distantDirection = SkPoint3::Make(SkScalarMul(SkScalarCos(azimuthRad),
- SkScalarCos(elevationRad)),
- SkScalarMul(SkScalarSin(azimuthRad),
- SkScalarCos(elevationRad)),
- SkScalarSin(elevationRad));
+ static SkPoint3 distantDirection = SkPoint3::Make(
+ SkScalarCos(azimuthRad) * SkScalarCos(elevationRad),
+ SkScalarSin(azimuthRad) * SkScalarCos(elevationRad),
+ SkScalarSin(elevationRad));
return distantDirection;
}