Behdad Esfahbod
|
bb33675e60
|
[sanitize] Micro-optimize check_range()
|
2023-07-02 14:11:40 -06:00 |
|
Behdad Esfahbod
|
d1c82a1cc6
|
[sanitize] Speed up check_struct()
Don't account for length here. Should not be a problem.
Fingers crossed fuzzers.
18% speed up in load_face_and_shape Gulzar-Regular.
|
2023-07-02 13:43:44 -06:00 |
|
Behdad Esfahbod
|
ec94386622
|
[OffsetTo] Micro-optimize away a check
|
2023-07-02 13:29:53 -06:00 |
|
Behdad Esfahbod
|
eae8278896
|
[GPOS] Micro-optimize lazy_some_gpos check
Speeds up 11% in:
BM_Font/load_face_and_shape/Roboto-Regular.ttf/hb
|
2023-07-02 13:07:26 -06:00 |
|
Behdad Esfahbod
|
46e54a2390
|
[GPOS] Remove extra check
|
2023-07-02 13:03:16 -06:00 |
|
Behdad Esfahbod
|
13438da16e
|
[benchmark-font] Minor move a variable
|
2023-07-02 12:56:13 -06:00 |
|
Behdad Esfahbod
|
7f5380fe94
|
[Composite] Don't apply transformation if phantom_only
|
2023-07-02 12:19:22 -06:00 |
|
Behdad Esfahbod
|
0cf759b0d4
|
[Glyph] Don't shift anchored Composite if phantom_only
Fixes https://oss-fuzz.com/testcase-detail/5114131137822720
|
2023-07-02 12:15:43 -06:00 |
|
Behdad Esfahbod
|
645bde4738
|
[Glyph] Pass phantom-only to gvar only for SIMPLE glyphs
For Composites we need to get the translation offset deltas.
|
2023-07-02 12:07:22 -06:00 |
|
Behdad Esfahbod
|
e92eefaabb
|
[gvar] Cache two values in shared_tuple_active_idx
Speeds up varc-hangul.ttf draw_glyph by 10%.
|
2023-07-02 11:38:00 -06:00 |
|
Behdad Esfahbod
|
7d72fdd5bf
|
[benchmark-font] Do some work in draw_glyph callbacks
For no good reason other than matching what I'm adding to
skrifa benchmark. Doesn't seem to affect benchmarks whatsoever.
|
2023-07-02 09:56:09 -06:00 |
|
Behdad Esfahbod
|
47b5ee6789
|
Merge pull request #4306 from harfbuzz/gpos-lazy-device
GPOS lazy Device
|
2023-07-01 14:48:39 -04:00 |
|
Behdad Esfahbod
|
2d6091fc42
|
[GPOS] Make AnchorMatrix sanitize lazy again
Was reverted in the previous commit, because it was incomplete.
|
2023-06-30 11:49:19 -06:00 |
|
Behdad Esfahbod
|
0887382cdf
|
[GPOS] Fix sanitize
|
2023-06-30 11:39:53 -06:00 |
|
Behdad Esfahbod
|
83eb744e09
|
[sanizie] Inline check_range if not OPTIMIZE_SIZE
BM_Font/load_face_and_shape/NotoNastaliqUrdu-Regular.ttf/hb -0.1046 -0.1051 194 173 193 172
BM_Font/load_face_and_shape/NotoSerifMyanmar-Regular.otf/hb -0.2401 -0.2412 36 27 36 27
|
2023-06-30 11:33:39 -06:00 |
|
Behdad Esfahbod
|
690af7aa69
|
[GPOS] Sanitize Device tables lazily
This speeds up face loading for variable fonts by 80%!
Comparing before to after
Benchmark Time CPU Time Old Time New CPU Old CPU New
---------------------------------------------------------------------------------------------------------------------------------------------------------------
BM_Font/load_face_and_shape/Roboto-Regular.ttf/hb -0.0368 -0.0366 20 20 20 19
BM_Font/load_face_and_shape/RobotoFlex-Variable.ttf/hb -0.7149 -0.7162 77 22 77 22
BM_Font/load_face_and_shape/RobotoFlex-Variable.ttf/var/hb -0.7241 -0.7255 80 22 79 22
BM_Font/load_face_and_shape/SourceSansPro-Regular.otf/hb -0.1441 -0.1445 28 24 28 24
BM_Font/load_face_and_shape/AdobeVFPrototype.otf/hb -0.7893 -0.7910 66 14 66 14
BM_Font/load_face_and_shape/AdobeVFPrototype.otf/var/hb -0.7865 -0.7882 67 14 66 14
BM_Font/load_face_and_shape/SourceSerifVariable-Roman.ttf/hb -0.8895 -0.8900 227 25 226 25
BM_Font/load_face_and_shape/SourceSerifVariable-Roman.ttf/var/hb -0.8895 -0.8900 226 25 225 25
BM_Font/load_face_and_shape/Comfortaa-Regular-new.ttf/hb -0.5512 -0.5531 42 19 42 19
BM_Font/load_face_and_shape/NotoNastaliqUrdu-Regular.ttf/hb -0.1511 -0.1510 227 192 225 191
BM_Font/load_face_and_shape/NotoSerifMyanmar-Regular.otf/hb -0.1494 -0.1498 41 35 40 34
OVERALL_GEOMEAN -0.6443 -0.6456 0 0 0 0
|
2023-06-30 11:05:54 -06:00 |
|
Behdad Esfahbod
|
7a35668258
|
Minor variable fix
|
2023-06-30 10:50:25 -06:00 |
|
Behdad Esfahbod
|
d338506ccf
|
[GPOS] Reuse sanitize_values_stride_unsafe in another function
|
2023-06-30 10:13:05 -06:00 |
|
Behdad Esfahbod
|
0fceaef0f7
|
[benchmark-subset] Report in microseconds, not milli
We're in that range now. :)
|
2023-06-30 08:50:49 -06:00 |
|
Behdad Esfahbod
|
547dc1a40e
|
[benchmark-font] Add load_face_and_shape benchmark
To measure face-loading performance
|
2023-06-30 08:48:43 -06:00 |
|
Behdad Esfahbod
|
fcf70af134
|
[perf] Fix break
|
2023-06-30 08:43:10 -06:00 |
|
Behdad Esfahbod
|
794fac327c
|
[glyf] Minor another range for loop
|
2023-06-29 20:56:16 -06:00 |
|
Behdad Esfahbod
|
0ae1676626
|
[CompositeGlyph] Minor use a range for loop
|
2023-06-29 20:38:42 -06:00 |
|
Behdad Esfahbod
|
05c01ad5d3
|
[SimpleGlyph] Minor use a range for loop
|
2023-06-29 16:49:20 -06:00 |
|
Behdad Esfahbod
|
4123e0c757
|
[path-builder] Speed up mid-point calculation
|
2023-06-29 16:27:35 -06:00 |
|
Behdad Esfahbod
|
73376b24cf
|
[subset/cff1] More error handling
|
2023-06-29 16:14:45 -06:00 |
|
Behdad Esfahbod
|
cc44b3bce0
|
[subset/cff1] Handle an error condition
Fixes https://oss-fuzz.com/testcase-detail/5191907895279616
|
2023-06-29 16:13:19 -06:00 |
|
Behdad Esfahbod
|
fc38c01ab0
|
Minor inline a function
|
2023-06-29 15:29:15 -06:00 |
|
Behdad Esfahbod
|
a520177e52
|
[gvar] Remove unnecessary initialization
|
2023-06-29 14:56:05 -06:00 |
|
Behdad Esfahbod
|
ca44c38c52
|
Add HB_ALWAYS_INLINE
With MSVC implementation as well.
|
2023-06-29 14:41:21 -06:00 |
|
Behdad Esfahbod
|
0a00dc0c71
|
[draw] Add a few unlikely's
|
2023-06-29 14:17:47 -06:00 |
|
Behdad Esfahbod
|
2d9c3da06a
|
[draw] Inline more functions
|
2023-06-29 13:31:11 -06:00 |
|
Behdad Esfahbod
|
17f29c8111
|
[benchmark_font/draw_glyphs] Implement quadratic_to
Not interested in the fallback implementation here.
|
2023-06-29 13:27:09 -06:00 |
|
Behdad Esfahbod
|
d26b3adebe
|
[draw-session] Inline small functions
|
2023-06-29 13:25:52 -06:00 |
|
Behdad Esfahbod
|
7aba1e6dd2
|
[cache] Minor use a range for loop
|
2023-06-29 12:44:34 -06:00 |
|
Behdad Esfahbod
|
afae537c3c
|
[cache] Minor remove .init()
Use constructor.
|
2023-06-29 12:42:44 -06:00 |
|
Behdad Esfahbod
|
c49ca37115
|
[Glyph] Minor micro-optimize away a function call
For when coords are not set.
|
2023-06-29 12:38:45 -06:00 |
|
Behdad Esfahbod
|
5fb7b02ac1
|
[CompositeGlyph] Minor use range loop
|
2023-06-29 12:28:43 -06:00 |
|
Behdad Esfahbod
|
20b32b049b
|
[SimpleGlyph] Micro-optimize phantom_only
|
2023-06-29 12:08:11 -06:00 |
|
Behdad Esfahbod
|
d1660eaf32
|
[subset/cff] Minor use HB_OPTIMIZE_SIZE_VAL
|
2023-06-29 11:59:03 -06:00 |
|
Behdad Esfahbod
|
04809ede8e
|
[CompositeGlyph] Micro-optimize translate()
|
2023-06-29 11:58:53 -06:00 |
|
Behdad Esfahbod
|
229db9735e
|
[CompositeGlyph] Minor use vector::push()
|
2023-06-29 11:54:10 -06:00 |
|
Behdad Esfahbod
|
75101802a1
|
[CompositeGlyph] Micro-optimize
|
2023-06-29 10:54:49 -06:00 |
|
Behdad Esfahbod
|
e9d74d6bb3
|
[SimpleGlyph] Minor add an unlikely to error condition
|
2023-06-29 10:53:52 -06:00 |
|
Behdad Esfahbod
|
6abca413ae
|
[path-builder] Micro-optimize
No need to initialize these when has_data=false.
|
2023-06-29 10:39:49 -06:00 |
|
Behdad Esfahbod
|
5703c1c4ea
|
[path-builder] Add a couple of unlikely's
|
2023-06-29 10:35:23 -06:00 |
|
Behdad Esfahbod
|
f5eead04e6
|
[glyf/gvar] Optimize getting variable phantom points
Used when there's no HVAR table and get_h_advance().
I see some 10% speedup with a SourceSerifVariable-Roman with
the HVAR table removed.
|
2023-06-28 15:07:15 -06:00 |
|
Behdad Esfahbod
|
e42d6df55e
|
[glyf] Minor refactor a couple of lines and micro-optimize
|
2023-06-28 14:25:26 -06:00 |
|
Behdad Esfahbod
|
c31471d10e
|
[glyf] Micro-optimize
|
2023-06-28 13:51:54 -06:00 |
|
Behdad Esfahbod
|
83d75d5e9b
|
[glyf] always_inline consume_point
7% speedup in:
BM_Font/draw_glyph/Roboto-Regular.ttf/hb
|
2023-06-28 13:35:24 -06:00 |
|