adadb95a9f
This does a few things, because they're all intertwined: 1) SkRuntimeEffect's API now includes details about children (which Skia stage was declared, not just the name). The factories verify that the declared types in the SkSL match up with the C++ types being passed. Today, we still only support adding children of the same type, so the checks are simple. Once we allow mixing types, we'll be testing the declared type against the actual C++ type supplied for each slot. 2) Adds sample variants that supply the input color to the child. This is now the only way to invoke a colorFilter child. Internally, we support passing a color when invoking a child shader, but I'm not exposing that. It's not clearly part of the semantics of the Skia pipeline, and is almost never useful. It also exposes users to several inconsistencies (skbug.com/11942). 3) Because of #2, it's possible that we can't compute a reusable program to filter individual colors. In that case, we don't set the constant output for constant input optimization, and filterColor4f falls back to the slower base-class implementation. Bug: skia:11813 skia:11942 Change-Id: I06c41e1b35056e486f3163a72acf6b9535d7fed4 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401917 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@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 | ||
DIR_METADATA | ||
go.mod | ||
go.sum | ||
LICENSE | ||
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.