f04fb3cacb
Adds setVertexAttributes and setInstanceAttributes. These take a pointer to the first attribute, and a count. The count is the total number of possible attributes, though some may not be initialized. The base class computes the number of initialized attributes, pre-computes the strides, and only allows subsequent access to the initialized attributes. The attributes need to be allocated contiguously. Some GPs place them in an array, though most just place them as consecutive members, and pass a pointer to the first one. Indexed access would be possible, but now it makes more sense to iterate over all attributes, so enable that, and use range-based for everywhere. Completely remove the per-attribute offset helper (again - possible, but not real helpful), and make the stride always available. In many ops, just use the GP's computed stride, rather than re-computing it. Bug: skia: Change-Id: Ie4cccb7969a98ee5a10b373e714fbd702e875b3e Reviewed-on: https://skia-review.googlesource.com/c/169241 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com> |
||
---|---|---|
animations | ||
bench | ||
bin | ||
dm | ||
docker | ||
docs | ||
example | ||
experimental | ||
fuzz | ||
gm | ||
gn | ||
include | ||
infra | ||
modules | ||
platform_tools | ||
resources | ||
samplecode | ||
site | ||
src | ||
tests | ||
third_party | ||
tools | ||
.clang-format | ||
.gitignore | ||
.gn | ||
AUTHORS | ||
BUILD.gn | ||
codereview.settings | ||
CONTRIBUTING | ||
CQ_COMMITTERS | ||
DEPS | ||
Doxyfile | ||
LICENSE | ||
OWNERS | ||
PRESUBMIT.py | ||
public.bzl | ||
README | ||
README.chromium | ||
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.