c97ebe06dc
Previously, the blocks owned by a GrBlockAllocator provided block-level metadata that users could control to track within a block. For types like GrTAllocator (and a collection coming down the pipe), they need to store a total count of allocations. Since GrBlockAllocator is max-aligned, having them hold on to a single extra int adds 4 to 12 bytes of padding for 8 and 16byte aligned platforms. But, the old Block size already has 4 bytes of extra padding since it was 28 bytes packed. This had been allowed to be allocation data, for requests that were 4-byte aligned or less. In practice, I think it's better to use that space for allocator-level metadata so that a total count, or other high-level data, can be packed into the data already held by GrBlockAllocator. Now GrTAllocator instances should be 8-16 bytes smaller on those same platforms. Also no longer writing into the struct-padded nether-realm, which is probably just a good thing on principle. Also cleans up how GrTAllocator's push_back() and emplace_back() are tested to make sure all options are clearly covered. Change-Id: If1da29132f3ec8df7a4056fcd834f760eb4693f5 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/303267 Commit-Queue: Michael Ludwig <michaelludwig@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com> |
||
---|---|---|
animations | ||
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 | ||
.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.