Commit Graph

7 Commits

Author SHA1 Message Date
Greg Daniel
719239cd69 Move all Ganesh source files into ganesh subdirectory.
Change-Id: I238d29ba0250224fa593845ae65192653f58faff
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528156
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
2022-04-07 21:06:50 +00:00
Herb Derby
72917e4529 return void* instead of char* from alignedBytes
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>
2021-02-24 17:23:54 +00:00
Herb Derby
1526444aa4 Allocator for GrTextBlobs
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>
2021-02-12 15:30:36 +00:00
Herb Derby
b33140ac7d allocation system for properly aligned bytes
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>
2021-02-11 23:17:28 +00:00
Mike Reed
ac9f0c9e27 Bitmap.asImage()
... 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>
2020-12-23 15:54:57 +00:00
Herb Derby
25f9db4597 test for extents of SkTextBlob drawing
Change-Id: I40e0630e913f4551da5f5fd045beae91dd7cd759
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332740
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2020-11-06 16:29:14 +00:00
Herb Derby
5d9d837994 error on the side of safety for empty blobs
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>
2020-09-23 21:18:27 +00:00