diff options
author | Jim Van Verth <jvanverth@google.com> | 2018-04-23 18:08:45 +0000 |
---|---|---|
committer | Jim Van Verth <jvanverth@google.com> | 2018-04-23 18:40:47 +0000 |
commit | 39e716562e9d44696ce86d0f680f74d1a4592c2f (patch) | |
tree | 620e4cd25df6e03d855e71f0debd6b0f67efeaa8 /src/utils | |
parent | 4229b35c3e4f205da793b1c5648f5436a6f037e1 (diff) |
Revert "Remove ambient clamp hack for analytic shadows."
This reverts commit d75b34394b5c53b0a5e8144dd28f956fbc8b90b2.
Reason for revert: Breaking GMs
Original change's description:
> Remove ambient clamp hack for analytic shadows.
>
> The hack was added to make analytic ambient shadows match the geometric
> ones exactly. Removing it does produce a slight difference, but it's
> only visible at full black values (and then, only slightly) and this
> makes room to pass a blend parameter for falloff.
>
> Also fixes an issue with filling out arcs in the shadow tesselator.
>
> Bug: skia:7486
> Change-Id: If78d0104df7e18f4320c1658af75576f6a4a8c73
> Reviewed-on: https://skia-review.googlesource.com/122580
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Jim Van Verth <jvanverth@google.com>
TBR=jvanverth@google.com,bsalomon@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: skia:7486
Change-Id: If0a20a358759c08a3a475d60be54a3d62ff7b6ad
Reviewed-on: https://skia-review.googlesource.com/123120
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'src/utils')
-rwxr-xr-x | src/utils/SkShadowTessellator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/SkShadowTessellator.cpp b/src/utils/SkShadowTessellator.cpp index 0bf1adaaa4..98c47a6f2d 100755 --- a/src/utils/SkShadowTessellator.cpp +++ b/src/utils/SkShadowTessellator.cpp @@ -121,7 +121,7 @@ static void compute_radial_steps(const SkVector& v1, const SkVector& v2, SkScala SkScalar rSin = v1.cross(v2); SkScalar theta = SkScalarATan2(rSin, rCos); - int steps = SkScalarRoundToInt(SkScalarAbs(r*theta*kRecipPixelsPerArcSegment)); + int steps = SkScalarFloorToInt(r*theta*kRecipPixelsPerArcSegment); SkScalar dTheta = theta / steps; *rotSin = SkScalarSinCos(dTheta, rotCos); |