aboutsummaryrefslogtreecommitdiff
path: root/src/test-tuple-varstore.cc
diff options
context:
space:
mode:
authorTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2023-10-19 00:16:08 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-10-19 00:16:08 +0000
commit8bf1ec54dfd29a2c1a2890b061f754b97ec24fdf (patch)
tree9212cc84b2d1ce6335f4c3b94dc3e2ecc306c638 /src/test-tuple-varstore.cc
parent3ab9717ac7248daeb34a1be0fbf5d7c9604a5358 (diff)
parente5c82fbba2b2dfbc3fefbd8db0c97cd8379eec0c (diff)
downloadharfbuzz_ng-8bf1ec54dfd29a2c1a2890b061f754b97ec24fdf.tar.gz
Merge "Update HarfBuzz to 8.2.2" into main am: e5c82fbba2
Original change: https://android-review.googlesource.com/c/platform/external/harfbuzz_ng/+/2795694 Change-Id: I745ca04feeb215d4b40064a81b49a423ef40655a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'src/test-tuple-varstore.cc')
-rw-r--r--src/test-tuple-varstore.cc24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/test-tuple-varstore.cc b/src/test-tuple-varstore.cc
index c1fb747e5..97fec25e7 100644
--- a/src/test-tuple-varstore.cc
+++ b/src/test-tuple-varstore.cc
@@ -39,7 +39,21 @@ test_decompile_cvar ()
axis_idx_tag_map.set (0, axis_tag);
OT::TupleVariationData::tuple_variations_t tuple_variations;
- bool result = cvar_table->decompile_tuple_variations (axis_count, point_count, false, &axis_idx_tag_map, tuple_variations);
+ hb_vector_t<unsigned> shared_indices;
+ OT::TupleVariationData::tuple_iterator_t iterator;
+
+ const OT::TupleVariationData* tuple_var_data = reinterpret_cast<const OT::TupleVariationData*> (cvar_data + 4);
+
+ unsigned len = sizeof (cvar_data);
+ hb_bytes_t var_data_bytes{cvar_data+4, len - 4};
+ bool result = OT::TupleVariationData::get_tuple_iterator (var_data_bytes, axis_count, cvar_table,
+ shared_indices, &iterator);
+ assert (result);
+
+ result = tuple_var_data->decompile_tuple_variations (point_count, false, iterator, &axis_idx_tag_map,
+ shared_indices, hb_array<const OT::F2DOT14> (),
+ tuple_variations);
+
assert (result);
assert (tuple_variations.tuple_vars.length == 2);
for (unsigned i = 0; i < 2; i++)
@@ -80,8 +94,10 @@ test_decompile_cvar ()
hb_hashmap_t<hb_tag_t, Triple> normalized_axes_location;
normalized_axes_location.set (axis_tag, Triple (-0.512817f, 0.f, 0.700012f));
- tuple_variations.change_tuple_variations_axis_limits (&normalized_axes_location);
- tuple_variations.merge_tuple_variations ();
+ hb_hashmap_t<hb_tag_t, TripleDistances> axes_triple_distances;
+ axes_triple_distances.set (axis_tag, TripleDistances (1.f, 1.f));
+
+ tuple_variations.instantiate (normalized_axes_location, axes_triple_distances);
assert (tuple_variations.tuple_vars[0].indices.length == 65);
assert (tuple_variations.tuple_vars[1].indices.length == 65);
@@ -112,7 +128,7 @@ test_decompile_cvar ()
hb_map_t axes_index_map;
axes_index_map.set (0, 0);
- bool res = tuple_variations.compile_bytes (axes_index_map, axis_idx_tag_map);
+ bool res = tuple_variations.compile_bytes (axes_index_map, axis_idx_tag_map, false);
assert (res);
assert (tuple_variations.tuple_vars[0].compiled_tuple_header.length == 6);
const char tuple_var_header_1[] = "\x0\x51\xa0\x0\xc0\x0";