f59a961dc9
Allows for uniforms to be automatically populated with marked canvas matrices: SkSL: layout (marker=localToWorld) uniform float4x4 localToWorldMatrix; C++: canvas->concat(...); canvas->markCTM("localToWorld"); canvas->concat(...); canvas->drawFoo(...); Any runtime effects created with that SkSL will have their localToWorldMatrix uniform filled in with the CTM, ignoring any transformation that happened before/above the markCTM call. The marker needs to be a sequence of alphanumeric or underscore characters, and match the string used in markCTM. The marker can also be of the form "normals(<string>)", in which case the uniform will be filled in with the transpose of the inverse of the upper-left 3x3 portion of the CTM identified by <string>. This is helpful for transforming normal vectors, as is often done in lighting. Change-Id: I7d1ca4dc3f8fabbe91b9bd2c8632013f26d2321a Reviewed-on: https://skia-review.googlesource.com/c/skia/+/285376 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com> |
||
---|---|---|
animations | ||
bench | ||
bin | ||
build/fuchsia | ||
build_overrides | ||
client_utils/android | ||
dm | ||
docker | ||
docs/examples | ||
example | ||
experimental | ||
fuzz | ||
gm | ||
gn | ||
include | ||
infra | ||
modules | ||
platform_tools | ||
resources | ||
samplecode | ||
site | ||
specs | ||
src | ||
tests | ||
third_party | ||
tools | ||
.clang-format | ||
.clang-tidy | ||
.gitignore | ||
.gn | ||
AUTHORS | ||
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 |
Skia is a complete 2D graphic library for drawing Text, Geometries, and Images. See full details, and build instructions, at https://skia.org.