e1bbd5c128
This was slightly complicated by the fact that this syntax indicates an array with a known size: float[] x = float[](1, 2, 3, 4); Of course, the size is 4; it's just never explicitly stated in the code. (The SkSL parser never actually deduces the size, but it doesn't apparently have a need to; we don't do much in the way of optimization for arrays.) However, this prevents us from simply failing whenever we parse "[]" in non-builtin code; we need to keep scanning and see if the variable is initialized. We already check this in the ArrayConstructors.sksl test file. Change-Id: I5b86958e81bd9bf5edf28a617cecf95c1875583e Bug: skia:10957 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/335240 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com> Auto-Submit: 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 | ||
tools | ||
.bazelignore | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
.gn | ||
AUTHORS | ||
BUILD.bazel | ||
BUILD.gn | ||
codereview.settings | ||
CONTRIBUTING | ||
CQ_COMMITTERS | ||
DEPS | ||
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.