4519134e07
Previously, the GrAllocator header defined three types: GrAllocator, GrTAllocator, and GrSTAllocator. GrAllocator was generic, and would manage the blocks of memory (fixed size to hold N * sizeof(item)). It stored an SkTArray of pointers to each block. GrTAllocator wrapped the GrAllocator to add template support for a specific T. GrSTAllocator extended GrTAllocator to include a template arg for inline storage. In this CL, GrAllocator is no longer defined, and its memory functionality is replaced with the use of GrBlockAllocator. For the most part, the implementation of GrTAllocator on top of GrBlockAllocator remains the same, although there is explicit array to the block pointers so indexing is slightly different. GrSTAllocator is also removed entirely, so that GrTAllocator's template includes initial storage size. The iteration over the allocated items is updated to wrap GrBlockAllocator's block iterator, and then iterate by index within each block. Documentation on GrAllocator already recommended using the iterator instead of random access, and these changes further reinforce it. It turns out that many of the use cases of GrAllocator were written to use random access, so many of the files outside of GrAllocator.h have just been updated to use the new for-range iteration instead of a random access for loop. Change-Id: I28b0bc277c323fd7035d4a8442ae67f058b2b64c Reviewed-on: https://skia-review.googlesource.com/c/skia/+/272058 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Chris Dalton <csmartdalton@google.com> |
||
---|---|---|
animations | ||
bench | ||
bin | ||
build/fuchsia | ||
build_overrides | ||
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.