Go to file
Michael Ludwig 4519134e07 Implement GrTAllocator in terms of GrBlockAllocator
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>
2020-03-24 18:00:33 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Revert "Revert "Revert "Revert "Don't build GL on Metal, Vulkan, Dawn, Direct3D bots"""" 2020-03-20 17:11:58 +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 Make skia_use_xps option work on Windows 2020-03-24 17:09:33 +00:00
docker Revert "fiddle - Don't make warnings into errors." 2020-02-07 21:39:38 +00:00
docs/examples Fix matrix scoping issue in sample 2020-03-23 13:44:53 +00:00
example Revert "Revert "switch to new filltype for SkPath"" 2019-11-26 17:43:14 +00:00
experimental Revert "Revert "Revert "Revert "Don't build GL on Metal, Vulkan, Dawn, Direct3D bots"""" 2020-03-20 17:11:58 +00:00
fuzz Revert "Revert "Revert "Revert "Don't build GL on Metal, Vulkan, Dawn, Direct3D bots"""" 2020-03-20 17:11:58 +00:00
gm Reland x2 "Drawing YUVA images does not flatten for bicubic." 2020-03-24 17:32:13 +00:00
gn Implement GrTAllocator in terms of GrBlockAllocator 2020-03-24 18:00:33 +00:00
include Support for custom vertex data in SkSL and drawVertices 2020-03-23 19:52:53 +00:00
infra Update SKP version 2020-03-23 16:08:33 +00:00
modules Revert "Switch to using a Float32Array (bound as value array) for color." 2020-03-24 14:20:04 +00:00
platform_tools Reland "GrGLMakeNativeInterface_{iOS,mac,win}: clean up" 2020-01-08 16:55:43 +00:00
resources Arrange instruction to reduce register pressure 2020-03-17 21:37:18 +00:00
samplecode Some bengali text does not have cluster index in ascending order 2020-03-23 16:23:43 +00:00
site add m82 release notes 2020-03-17 17:17:41 +00:00
specs [img-decode] Start on proposed new spec 2019-05-06 17:39:19 +00:00
src Implement GrTAllocator in terms of GrBlockAllocator 2020-03-24 18:00:33 +00:00
tests Implement GrTAllocator in terms of GrBlockAllocator 2020-03-24 18:00:33 +00:00
third_party Add missing files to Dawn build 2020-03-24 14:42:54 +00:00
tools add --skvm and '!' to viewer to toggle using skvm blitters 2020-03-21 19:31:11 +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 Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
AUTHORS Optimize SkSL xor where one argument is constant 2019-12-20 14:50:46 +00:00
BUILD.gn Make skia_use_xps option work on Windows 2020-03-24 17:09:33 +00:00
codereview.settings Make uploading to Gerrit the default for Skia 2016-11-09 19:07:56 +00:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS Roll third_party/externals/angle2 31e36a631345..6fead3754375 (1 commits) 2020-03-24 04:45:04 +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 [skottie] Cleanup: split animators into separate CUs 2020-03-17 15:48:17 +00:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
RELEASE_NOTES.txt Flesh out backend textures and rendertargets to support Direct3D. 2020-03-20 17:12:46 +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.