Behdad Esfahbod
c606978ee0
[array] Remove unused type pack
2022-08-18 16:13:56 -06:00
Garret Rieger
37d61afd5e
[subset] add destructor to subset plan.
...
This ensures that it's members get destructed before the plan itself is destructed, as hb_object_destroy calls the destructor for plan.
2022-08-18 16:09:36 -06:00
Garret Rieger
a91bfeeda5
[repacker] comment cleanup.
2022-08-18 22:01:48 +00:00
Garret Rieger
015ca5bc3c
[repacker] fix compiler alignment warning.
2022-08-18 21:52:55 +00:00
Behdad Esfahbod
de37b2650d
[object] Only destruct object if it's not trivially-destructible
...
Such that we're legally free to access the object to destruct its
(pointer) fields ourselves afterwards. For things like hb_font_t,
hb_face_t, etc.
2022-08-18 15:21:48 -06:00
Garret Rieger
683c5dd21e
[repacker] further reduce base count.
2022-08-18 20:57:04 +00:00
Garret Rieger
5ddf41fc9c
[repacker] speed up MarkBasePos test case by using a smaller basecount.
2022-08-18 20:28:05 +00:00
Garret Rieger
bf28b84ae8
[repacker] cleanup unused base_array_id.
2022-08-18 01:51:37 +00:00
Garret Rieger
31976bfb50
[repacker] cleanup unused base_array_links.
2022-08-18 01:50:35 +00:00
Garret Rieger
6f5c52b604
[repacker] optimize AnchorMatrix::clone.
...
Previous runtime is O(n^2) reduced to O(n).
2022-08-18 01:48:10 +00:00
Garret Rieger
29e3b2467e
[repacker] optimzie remove_real_links as it's a hot method.
2022-08-18 01:19:54 +00:00
Garret Rieger
46b5dbd7ce
[repacker] optimize index_for_offset.
2022-08-18 01:18:16 +00:00
Garret Rieger
52303638b9
[repacker] correct size calculation for MarkBasePosFormat1.
2022-08-18 01:10:42 +00:00
Garret Rieger
ac1a853abc
[repacker] implement sanitize methods for MarkBasePos.
2022-08-18 00:55:47 +00:00
Garret Rieger
a3ed9f9099
[repacker] fix graph comparison, and mark base pos generation for the tests.
2022-08-17 23:39:11 +00:00
Garret Rieger
19c51ed35c
[repacker] Get mark base pos test working.
2022-08-17 19:15:55 +00:00
Garret Rieger
b46ced9562
[repacker] correct MarkArray size calculation.
2022-08-17 17:51:29 +00:00
Garret Rieger
36c76c27c6
[repacker] when clearing links in MarkArray, also clear parents of the children.
2022-08-17 17:30:21 +00:00
Garret Rieger
8c3db8bdfd
[repacker] more progress on MarkBasePos tests.
2022-08-17 00:36:23 +00:00
Behdad Esfahbod
172cc82032
[BUILD] Minor reword (and reformat)
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3784
2022-08-16 13:21:02 -06:00
Garret Rieger
1405f96b6f
[repacker] change run_resolve_overflow_test to check for graph equivalence.
...
Replaces a check for an exact match on the final serialized bytes. The previous check enforced equivalent topological sorting between result and expected, but we only really care that the graph's are equivalent and don't overflow.
2022-08-15 23:48:00 +00:00
Garret Rieger
07fd0528c0
[repacker] add graph equality check.
...
Does not compare topological sorting, but looks for equivalence of the two graphs.
2022-08-15 23:16:51 +00:00
Garret Rieger
5cf2a25a60
[repacker] Expose on internal method in the repacker that allows the caller to pass in/out a graph.
...
Will be used in testing so we can compare graphs instead of packed result.
2022-08-15 22:49:24 +00:00
Garret Rieger
c414ef292b
[repacker] Implement MarkArray::shrink.
2022-08-15 22:10:37 +00:00
Behdad Esfahbod
4ab7e579cb
Make HB_BORING_EXPANSION opt-in instead of opt-out
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3757
2022-08-12 12:23:48 -06:00
Garret Rieger
f8b5520556
[repacker] Add AnchorMatrix::shrink.
2022-08-11 23:09:36 +00:00
Garret Rieger
bbe14417ad
[repacker] Begin implementing MarkBasePosFormat1::shrink.
2022-08-11 22:53:30 +00:00
Garret Rieger
c9ddf0815a
[repacker] Implement AnchorMatrix::clone.
2022-08-11 22:34:59 +00:00
Garret Rieger
5ea3c0be8f
[repacker] Implement MarkArray::clone.
2022-08-11 22:21:28 +00:00
Garret Rieger
0083fd109c
[repacker] add as_table() helper to graph.
2022-08-11 22:09:46 +00:00
Garret Rieger
b00eb77682
[repack] Add add_link helper to graph.
2022-08-11 20:33:21 +00:00
Garret Rieger
1acd2a8bf9
[repacker] implement MarkBasePosFormat1::clone_range.
2022-08-11 20:22:31 +00:00
Garret Rieger
cf817f3d99
[repacker] Hook up MarkBasePos splitting.
2022-08-11 19:26:59 +00:00
Garret Rieger
4418beac93
[repacker] start implmenting MarkBasePos splitting.
2022-08-11 19:08:04 +00:00
Behdad Esfahbod
f4f7d691af
Merge pull request #3779 from harfbuzz/split_pair_pos_2
...
[repacker] Add PairPosFormat2 table splitting in the repacker.
2022-08-09 22:23:23 -06:00
Garret Rieger
fa46dbca9d
[repacker] Make actuate_subtable_split internal.
2022-08-08 17:07:14 +00:00
Garret Rieger
fe15f2559f
[repacker] use position instead of memory address as key in device_tables map.
2022-08-08 16:57:28 +00:00
Garret Rieger
163fbf0be1
[repacker] Check for nullptr's before sanitizing.
2022-08-05 23:37:11 +00:00
Garret Rieger
13253233f7
[repacker] in PairPosFormat2 splitting use the max estimated coverage/classdef size for sizing serialization buffers.
2022-08-05 23:15:10 +00:00
Garret Rieger
dde0a2b071
[repacker] track estimated coverage size during PairPosFormat1 split point analysis.
2022-08-05 22:30:37 +00:00
Garret Rieger
b37e8bef0e
[repacker] count size of the current class at the split point in the next segment.
2022-08-05 22:16:20 +00:00
Qunxin Liu
7fde6ab025
fuzzer fix: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49790
2022-08-05 15:10:31 -06:00
Behdad Esfahbod
a4e0fd1685
[MultipleSubst] Rewrite serialize signature as single iterator
2022-08-05 15:05:51 -06:00
Behdad Esfahbod
65d28bc5a7
[MultipleSubst] Rewrite serialize() in terms of iterators
...
Unused still, and hence untested
2022-08-05 14:56:07 -06:00
Behdad Esfahbod
b57ea3b053
Revert "[iter] Use && in uses of is_source_of"
...
This reverts commit ccbba667a9
.
2022-08-05 14:29:27 -06:00
Garret Rieger
0e48a65d32
[repacker] estimate size of classDef1 and coverage during PairPos2 split point analysis.
2022-08-05 20:19:11 +00:00
Garret Rieger
2264df6da3
[repacker] add utility that can calculate the size of Coverage+ClassDef via incremental class inclusion.
2022-08-05 18:33:03 +00:00
Behdad Esfahbod
ccbba667a9
[iter] Use && in uses of is_source_of
2022-08-05 11:51:51 -06:00
Behdad Esfahbod
8fb7cc1c63
[iter] Use && in is_sink_of uses
2022-08-05 11:49:29 -06:00
Garret Rieger
5d824c09c0
[repacker] during table splits don't mutate shared coverage/classdef in place.
...
If other subtables are sharing coverage with a subtable being split we have to duplicate the coverage/classdef tables before they are modified during the shrink operation.
2022-08-05 01:37:14 +00:00