[subset] Remove OffsetTo::serialize().
Convert remaining uses of it to serialize_serialize() which correctly uses the object packer.
This commit is contained in:
parent
0969614865
commit
0da9158f62
|
@ -328,10 +328,6 @@ struct OffsetTo : Offset<OffsetType, has_null>
|
|||
hb_enable_if (hb_is_convertible (Base, void *))>
|
||||
friend Type& operator + (OffsetTo &offset, Base &&base) { return offset ((void *) base); }
|
||||
|
||||
Type& serialize (hb_serialize_context_t *c, const void *base)
|
||||
{
|
||||
return * (Type *) Offset<OffsetType>::serialize (c, base);
|
||||
}
|
||||
|
||||
template <typename ...Ts>
|
||||
bool serialize_subset (hb_subset_context_t *c, const OffsetTo& src,
|
||||
|
|
|
@ -2790,8 +2790,8 @@ struct VariationStore
|
|||
(src+src->dataSets[i]).collect_region_refs (region_map, inner_maps[i]);
|
||||
region_map.sort ();
|
||||
|
||||
if (unlikely (!regions.serialize (c, this)
|
||||
.serialize (c, &(src+src->regions), region_map))) return_trace (false);
|
||||
if (unlikely (!regions.serialize_serialize (c, &(src+src->regions), region_map)))
|
||||
return_trace (false);
|
||||
|
||||
/* TODO: The following code could be simplified when
|
||||
* List16OfOffset16To::subset () can take a custom param to be passed to VarData::serialize ()
|
||||
|
@ -2801,8 +2801,8 @@ struct VariationStore
|
|||
for (unsigned int i = 0; i < inner_maps.length; i++)
|
||||
{
|
||||
if (inner_maps[i].get_population () == 0) continue;
|
||||
if (unlikely (!dataSets[set_index++].serialize (c, this)
|
||||
.serialize (c, &(src+src->dataSets[i]), inner_maps[i], region_map)))
|
||||
if (unlikely (!dataSets[set_index++]
|
||||
.serialize_serialize (c, &(src+src->dataSets[i]), inner_maps[i], region_map)))
|
||||
return_trace (false);
|
||||
}
|
||||
|
||||
|
|
|
@ -367,15 +367,15 @@ struct HVARVVAR
|
|||
TRACE_SERIALIZE (this);
|
||||
if (im_plans[index_map_subset_plan_t::ADV_INDEX].is_identity ())
|
||||
advMap = 0;
|
||||
else if (unlikely (!advMap.serialize (c, this).serialize (c, im_plans[index_map_subset_plan_t::ADV_INDEX])))
|
||||
else if (unlikely (!advMap.serialize_serialize (c, im_plans[index_map_subset_plan_t::ADV_INDEX])))
|
||||
return_trace (false);
|
||||
if (im_plans[index_map_subset_plan_t::LSB_INDEX].is_identity ())
|
||||
lsbMap = 0;
|
||||
else if (unlikely (!lsbMap.serialize (c, this).serialize (c, im_plans[index_map_subset_plan_t::LSB_INDEX])))
|
||||
else if (unlikely (!lsbMap.serialize_serialize (c, im_plans[index_map_subset_plan_t::LSB_INDEX])))
|
||||
return_trace (false);
|
||||
if (im_plans[index_map_subset_plan_t::RSB_INDEX].is_identity ())
|
||||
rsbMap = 0;
|
||||
else if (unlikely (!rsbMap.serialize (c, this).serialize (c, im_plans[index_map_subset_plan_t::RSB_INDEX])))
|
||||
else if (unlikely (!rsbMap.serialize_serialize (c, im_plans[index_map_subset_plan_t::RSB_INDEX])))
|
||||
return_trace (false);
|
||||
|
||||
return_trace (true);
|
||||
|
@ -398,8 +398,10 @@ struct HVARVVAR
|
|||
out->version.major = 1;
|
||||
out->version.minor = 0;
|
||||
|
||||
if (unlikely (!out->varStore.serialize (c->serializer, out)
|
||||
.serialize (c->serializer, hvar_plan.var_store, hvar_plan.inner_maps.as_array ())))
|
||||
if (unlikely (!out->varStore
|
||||
.serialize_serialize (c->serializer,
|
||||
hvar_plan.var_store,
|
||||
hvar_plan.inner_maps.as_array ())))
|
||||
return_trace (false);
|
||||
|
||||
return_trace (out->T::serialize_index_maps (c->serializer,
|
||||
|
@ -466,7 +468,7 @@ struct VVAR : HVARVVAR {
|
|||
return_trace (false);
|
||||
if (!im_plans[index_map_subset_plan_t::VORG_INDEX].get_map_count ())
|
||||
vorgMap = 0;
|
||||
else if (unlikely (!vorgMap.serialize (c, this).serialize (c, im_plans[index_map_subset_plan_t::VORG_INDEX])))
|
||||
else if (unlikely (!vorgMap.serialize_serialize (c, im_plans[index_map_subset_plan_t::VORG_INDEX])))
|
||||
return_trace (false);
|
||||
|
||||
return_trace (true);
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue