Not as many casts needed to use this.
Change-Id: I871b5f3f9658d349d08d396f2cb8ec5498c3b50b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/375061
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Herb Derby <herb@google.com>
This allocator is made specifically to handle the memory after
the class of a textblob. It is lighter weight than ArenaAlloc,
easier to calculate needed memory.
Change-Id: Ie9f94e08e2ffd4041712dd3025296a830e940eb3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/356317
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
GrBagOfBytes parcels out bytes with a given size and alignment.
It is very careful about checking all values coming so that
no calculations overflows.
If the current block is not big enough to satisfy the request
bytes, a new block will be allocated to satisfy the
requested bytes.
Change-Id: If7b5e812f903b51ba4936605cd0dc298dda8821a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368117
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
... and lots and lots of IWYU
Change-Id: Ie5157dcdd2e6d29b95c71b39153278ab48ef4eb3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/346778
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
If the blob is empty, then try to regenerate it. Using
this method caused a slowdown in Skia perf, so we
added an extra check to allow some empty blobs through
for perf performance. The perf problem was caused by
SKPs generate empty blobs because of font mismatches.
Flutter has shown that scaling from very small to
normal size is not correctly handled by the existing
check. This CL favors correctness over optimizing empty
text blob and always regenerates empty blobs.
https://github.com/flutter/flutter/issues/64936
Change-Id: Ib18ecb684b0af5cf6dce274b6dc09a9c61b17c77
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/319031
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>