4d1a935835
Previously, when attempting to cast a huge value to an int, SkSL would report an error, then return the IR for `ScalarCast(Int, FloatLiteral(huge-value))` . Now, to minimize the blast radius of the error, we report the error but return `IntLiteral(0)`. We've already reported an error, so there's no need to preserve the value, and zero is less likely to produce follow-up errors. (A similar approach is used here and worked well: https://osscs.corp.google.com/skia/skia/+/main:src/sksl/ir/SkSLConstructorCompoundCast.cpp;l=57-59) Change-Id: Ie8e8d48380cb963466d1f47d123d64e3301cf87c Reviewed-on: https://skia-review.googlesource.com/c/skia/+/499563 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com> Commit-Queue: John Stiles <johnstiles@google.com> |
||
---|---|---|
animations | ||
bazel | ||
bench | ||
bin | ||
build/fuchsia | ||
build_overrides | ||
client_utils/android | ||
demos.skia.org | ||
dm | ||
docker | ||
docs/examples | ||
example | ||
experimental | ||
fuzz | ||
gm | ||
gn | ||
include | ||
infra | ||
modules | ||
platform_tools | ||
resources | ||
samplecode | ||
site | ||
specs | ||
src | ||
tests | ||
third_party | ||
toolchain | ||
tools | ||
.bazelrc | ||
.bazelversion | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
.gn | ||
.vpython | ||
AUTHORS | ||
BUILD.bazel | ||
BUILD.gn | ||
codereview.settings | ||
CONTRIBUTING | ||
CQ_COMMITTERS | ||
DEPS | ||
DIR_METADATA | ||
go_repositories.bzl | ||
go.mod | ||
go.sum | ||
LICENSE | ||
OWNERS | ||
PRESUBMIT.py | ||
public.bzl | ||
README | ||
README.chromium | ||
RELEASE_NOTES.txt | ||
whitespace.txt | ||
WORKSPACE.bazel |
Skia is a complete 2D graphic library for drawing Text, Geometries, and Images. See full details, and build instructions, at https://skia.org.