Behdad Esfahbod
e6a9550790
[layout] Use AVX2 SIMD instructions for apply_forward()
...
To skip eight glyphs at a time.
Like the NEON instructions, this slows down shaping by up to 35%,
for Amiri.
https://github.com/harfbuzz/harfbuzz/issues/566
2023-05-04 11:55:46 -06:00
Behdad Esfahbod
26331951a1
[layout] Use NEON SIMD instructions for apply_forward()
...
To skip four glyphs at a time.
Unfortunately slows down benchmark-shape by up to 25% for Amiri, instead of
speeding anything up. This is due to the overhead of switching back and forth
between the ARM and NEON processors.
To be experimented with: Same architecture but with AVX on x86_64 to skip 8
glyphs at a time.
https://github.com/harfbuzz/harfbuzz/issues/566
2023-05-04 11:55:39 -06:00
Behdad Esfahbod
a10fad7cc2
[config] Add HB_NO_GDEF_CACHE
2023-05-04 11:32:07 -06:00
Behdad Esfahbod
e138319fcc
[config] Allow overriding HB_OPTIMIZE_SIZE
2023-05-04 11:28:50 -06:00
Behdad Esfahbod
319a488b39
[GDEF] Fix null check
...
Fixes https://oss-fuzz.com/testcase-detail/5920994267889664
2023-05-04 10:36:48 -06:00
Behdad Esfahbod
3f2401e2f1
[layout] Don't init iters successively multiple times
2023-05-03 17:03:12 -06:00
Behdad Esfahbod
959f16343b
[gsubgpos] Minor reduce variable scope
2023-05-03 16:28:39 -06:00
Behdad Esfahbod
fb795dc3c5
[GPOS] Optimize iterator reset
...
Speeds up Gulzar shaping 5%.
2023-05-03 15:17:36 -06:00
Behdad Esfahbod
0c1637b606
[aat] Fix HB_NO_OT_LAYOUT build
2023-05-03 15:04:57 -06:00
Behdad Esfahbod
8a8fc37c42
[GDEF] Use a cache for glyph classes
...
Shows 5% speedup for Roboto shaping.
2023-05-03 15:00:19 -06:00
Behdad Esfahbod
323a1fe496
[PairPos] Fix what I broke
2023-05-03 13:52:43 -06:00
Behdad Esfahbod
a6f5f0dc4a
[PairSet] Micro-optimize
2023-05-03 13:45:39 -06:00
Behdad Esfahbod
4e495eb0a7
[PairPos] Add an unlikely
2023-05-03 13:40:46 -06:00
Behdad Esfahbod
5528bdd46f
[PairPos] Remove a likely
2023-05-03 13:35:10 -06:00
Behdad Esfahbod
ae0fe02d13
[Ligature] Use slow path if 2 or fewer ligatures
2023-05-03 13:30:00 -06:00
Behdad Esfahbod
ddd6c2e7a2
[Ligature] Micro-optimize more
2023-05-03 13:17:47 -06:00
Behdad Esfahbod
045ae4b0b5
[GPOS] Micro-optimize
2023-05-03 13:08:43 -06:00
Behdad Esfahbod
0fe90ebc00
[Ligature] Micro-optimize
2023-05-03 13:00:10 -06:00
Behdad Esfahbod
51061d2854
[Ligature] Minor tweak to recent code
2023-05-03 12:46:04 -06:00
Behdad Esfahbod
7881eadffc
[Ligature] Speed up
...
Match the first component of the ligature in the LigatureSet loop.
Speeds up Roboto shaping by 25%. I don't think it breaks anything.
The test suite seems happy.
2023-05-03 12:41:31 -06:00
Behdad Esfahbod
95f155573c
[PairPosFormat2] Micro-optimize and don't kern if class2=0
...
If class2=0 we expect no kerning to happen. Just bail out.
2023-05-02 16:37:31 -06:00
Behdad Esfahbod
5996715436
[PairPos2] Micro-optimize
2023-05-02 15:52:43 -06:00
Behdad Esfahbod
49ac5e11ef
[match_input] Micro-optimize
2023-05-02 12:14:18 -06:00
Behdad Esfahbod
7e7f1d0414
Drop a pair of parantheses from likely/unlikely
...
Such that "if likely(...)" wouldn't compile.
2023-05-02 12:06:00 -06:00
Behdad Esfahbod
db730f46d0
Simplify likely/unlikely
...
This surprisingly saves bytes and speeds up.
2023-05-02 11:55:10 -06:00
Behdad Esfahbod
2f9945ca01
[Glyph] Only treat numContours=-1 as Composite
...
Leave the other negative numbers as empty glyph.
2023-05-02 11:33:31 -06:00
Garret Rieger
db23be642f
[subset] clamp head *Min/*Max values to fit within 16 bit signed int.
...
Fixes fuzzer https://oss-fuzz.com/testcase-detail/4549472192692224 .
2023-05-01 20:28:58 -06:00
Behdad Esfahbod
a8b8eb53c3
[Coverage] Micro-optimize
2023-05-01 16:56:29 -06:00
Behdad Esfahbod
af21ea359c
[Coverage/serialize] Micro-optimize
2023-05-01 16:37:37 -06:00
Behdad Esfahbod
491f2968cd
[gvar] Micro-optimize
...
We don't need the flag in the case of apply_to_all.
2023-05-01 15:58:57 -06:00
Behdad Esfahbod
19d8328b63
[VarComposite] Minor use pad instead of StructAfter
2023-05-01 15:54:27 -06:00
Behdad Esfahbod
1b74cd7c2d
[gvar] Micro-optimize
2023-05-01 15:43:00 -06:00
Behdad Esfahbod
267ecd20c8
[normalize] Micro-optimize
2023-05-01 14:06:12 -06:00
Behdad Esfahbod
577bc8a239
[layout] Micro-optimize
2023-05-01 14:01:08 -06:00
Behdad Esfahbod
5b78e9a924
[layout] Whitespace
2023-05-01 13:45:42 -06:00
Behdad Esfahbod
3f9eb03b40
[graph] Micro-optimize
2023-05-01 12:55:29 -06:00
Behdad Esfahbod
1cbb85dc84
[Glyph] Protect against an underflow
2023-04-30 11:31:46 -06:00
Behdad Esfahbod
c7721f7df5
[Glyph] Reuse variables
2023-04-30 11:28:40 -06:00
Behdad Esfahbod
e826d94afe
Call roundf() instead of _hb_roundf()
...
The former is defined as a macro expanding to the latter.
2023-04-30 11:11:19 -06:00
Behdad Esfahbod
fbffd4e65e
[SimpleGlyph] Handle cubic curves when instancing
2023-04-30 10:45:19 -06:00
Behdad Esfahbod
85a0a12338
[SimpleGlyph] Relax types
2023-04-30 10:40:50 -06:00
Behdad Esfahbod
2e5e566504
[SimpleGlyph] Micro-optimize
2023-04-30 10:23:58 -06:00
Behdad Esfahbod
7b9832deab
[buffer] Whitespace
2023-04-29 12:56:07 -06:00
Behdad Esfahbod
700975f732
[gvar/glyf] Minor save a variable
2023-04-29 11:26:03 -06:00
Behdad Esfahbod
07be0b6878
[VarComposite] Minor micro-optimize
2023-04-29 11:09:28 -06:00
Behdad Esfahbod
ecd0f859bd
[Composite] Minor micro-optimize
2023-04-29 10:52:49 -06:00
Han Seung Min - 한승민
e768754b0f
[buffer] fix hb_buffer_t::similar
setting replacement
to src.invisible
...
```cpp
void
hb_buffer_t::similar (const hb_buffer_t &src)
{
hb_unicode_funcs_destroy (unicode);
unicode = hb_unicode_funcs_reference (src.unicode);
flags = src.flags;
cluster_level = src.cluster_level;
replacement = src.invisible; // <- this should be src.replacement
invisible = src.invisible;
not_found = src.not_found;
}
```
2023-04-29 09:58:38 -06:00
Behdad Esfahbod
afd432daf5
[VarComposite] Fix an #ifdef check
2023-04-28 14:55:37 -06:00
Behdad Esfahbod
b53f8c25ca
[path-builder] Simplify initialization
2023-04-28 14:49:22 -06:00
Behdad Esfahbod
6a4b87d003
[path-builder] Remove double-initialization
2023-04-28 14:48:46 -06:00