Go to file
Michael Ludwig cd01979004 Refactor GrMemoryPool into reusable GrBlockAllocator
This moves the byte block linked list structure outside of GrMemoryPool
into a new type, GrBlockAllocator. This new type is solely responsible
for managing the byte blocks, tracking where the next allocation
occurs, and creating/destroying the byte blocks. It also tries to
encapsulate all of/most alignment related math, while making it
convenient for clients to add per-allocation padding/metadata.

It has added functionality compared to the original block linked list
that was embedded in GrMemoryPool:
 - Supports resetting the entire allocator
 - Supports resizing the last allocation
 - Is able to rewind an entire stack of allocations, instead of just the
   last allocation.
 - Supports multiple block growth policies instead of just a fixed size.
 - Supports templated alignment, and variable alignment within a single
   GrBlockAllocator
 - Query the amount of available memory
 - Performs as much math as possible in 32-bit ints with static asserts
   that ensure overflow won't happen.

Some of this flexibility was added so that the GrBlockAllocator can be
used to implement an arena allocator similar to SkArenaAlloc, or to
replace the use of SkTArray in GrQuadBuffer. It is also likely possible
that GrAllocator can be written on top of GrBlockAllocator. I will try
to perform these consolidations in later CLs.

Change-Id: Ia6c8709642369b66b88eb1bc46264fb2aa9b62ab
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262216
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
2020-03-17 14:41:14 +00:00
animations
bench Add pass-through helper methods from GrOpFlushState to GrOpsRenderPass 2020-03-16 19:53:26 +00:00
bin [infra] Fix bin/try 2020-01-14 12:05:56 +00:00
build/fuchsia Add command line argument to specify the rendertests file. 2020-03-05 17:51:12 +00:00
build_overrides Add Dawn on Windows job. 2020-02-28 17:48:37 +00:00
dm Clean up for DDL program pre-compilation 2020-03-05 19:11:37 +00:00
docker Revert "fiddle - Don't make warnings into errors." 2020-02-07 21:39:38 +00:00
docs/examples Remove exotic legacy bitmap drawing entry points: Nine, Lattice 2020-03-11 13:11:47 +00:00
example Revert "Revert "switch to new filltype for SkPath"" 2019-11-26 17:43:14 +00:00
experimental Reland "Split building encoding from decoding" 2020-03-09 20:21:19 +00:00
fuzz Remove exotic legacy bitmap drawing entry points: Nine, Lattice 2020-03-11 13:11:47 +00:00
gm Add pass-through helper methods from GrOpFlushState to GrOpsRenderPass 2020-03-16 19:53:26 +00:00
gn Refactor GrMemoryPool into reusable GrBlockAllocator 2020-03-17 14:41:14 +00:00
include remove unused mutate() apis 2020-03-16 20:44:36 +00:00
infra [infra] Minor refactor for recipe properties in gen_tasks 2020-03-16 18:29:50 +00:00
modules Revert "Allow null rect for saveLayer" 2020-03-16 18:08:45 +00:00
platform_tools Reland "GrGLMakeNativeInterface_{iOS,mac,win}: clean up" 2020-01-08 16:55:43 +00:00
resources restore Op::round 2020-03-12 21:10:34 +00:00
samplecode remove LerpRed shader 2020-03-12 18:37:17 +00:00
site [canvaskit] Update dash example link to use new API. 2020-03-09 17:56:30 +00:00
specs [img-decode] Start on proposed new spec 2019-05-06 17:39:19 +00:00
src Refactor GrMemoryPool into reusable GrBlockAllocator 2020-03-17 14:41:14 +00:00
tests Refactor GrMemoryPool into reusable GrBlockAllocator 2020-03-17 14:41:14 +00:00
third_party Restore logic to check for .git in ANGLE BUILD.gn 2020-03-02 20:02:19 +00:00
tools Make persistent cache serialization safer 2020-03-17 13:52:47 +00:00
.clang-format restore .clang-format 2019-03-21 15:52:32 +00:00
.clang-tidy add google-build-namespaces to clang-tidy checks 2018-12-12 16:33:59 +00:00
.gitignore clean up some .gitignores 2019-05-15 19:55:45 +00:00
.gn
AUTHORS Optimize SkSL xor where one argument is constant 2019-12-20 14:50:46 +00:00
BUILD.gn Reland "Split building encoding from decoding" 2020-03-09 20:21:19 +00:00
codereview.settings
CONTRIBUTING
CQ_COMMITTERS
DEPS Roll ../src 6d7621abf90d..21cbc653d600 (395 commits) 2020-03-17 04:37:17 +00:00
go.mod Update Go Deps 2020-03-11 05:30:16 +00:00
go.sum Update Go Deps 2020-03-11 05:30:16 +00:00
LICENSE LICENSE file: clean up 2019-11-22 21:59:03 +00:00
OWNERS add OWNERS file 2017-12-01 19:50:19 +00:00
PRESUBMIT.py [Tree Status] Update all references in Skia repo to tree-status 2020-03-02 18:43:49 +00:00
public.bzl Reland "Split building encoding from decoding" 2020-03-09 20:21:19 +00:00
README
README.chromium
RELEASE_NOTES.txt fix up release notes file for milestone 83 2020-03-16 15:14:30 +00:00
whitespace.txt Whitespace change to re-trigger Mac/iOS tests 2020-02-23 20:55:01 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.