8a9da73687
The previous implementation assumed that SkSL expressions do not have side effects and so treated either side of a Boolean expression as short-circuitable. That is, `foo() && false` and `false && foo()` would both be optimized to `false`, eliminating the `foo()` call. We now check for side effects first. An expression like `expr && false` can only be optimized to `false` if `expr` has no side effects. (If `expr` does have side effects, the expression is left as-is.) Change-Id: I473cf026a8afe35d6a8d9518498f2b26d8996e60 Bug: skia:11162 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356357 Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Brian Osman <brianosman@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> |
||
---|---|---|
.. | ||
blend | ||
errors | ||
folding | ||
fp | ||
glsl | ||
inliner | ||
intrinsics | ||
metal | ||
runtime | ||
runtime_errors | ||
shared | ||
spirv | ||
workarounds |