[serialize] Switch to tetris-packing
This commit is contained in:
parent
f0ea3ac17b
commit
bfa02bef45
|
@ -282,15 +282,22 @@ struct OffsetTo : Offset<OffsetType, has_null>
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void serialize_subset (hb_subset_context_t *c, const T &src, const void *base)
|
void serialize_subset (hb_subset_context_t *c, const T &src, const void *base)
|
||||||
{
|
|
||||||
if (&src == &Null (T))
|
|
||||||
{
|
{
|
||||||
*this = 0;
|
*this = 0;
|
||||||
|
if (&src == &Null (T))
|
||||||
|
return;
|
||||||
|
|
||||||
|
//serialize (c->serializer, base);
|
||||||
|
|
||||||
|
c->serializer->push ();
|
||||||
|
if (!src.subset (c))
|
||||||
|
{
|
||||||
|
c->serializer->pop_discard ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
serialize (c->serializer, base);
|
c->serializer->add_link (*this,
|
||||||
if (!src.subset (c))
|
c->serializer->pop_pack (),
|
||||||
*this = 0;
|
base);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool sanitize_shallow (hb_sanitize_context_t *c, const void *base) const
|
bool sanitize_shallow (hb_sanitize_context_t *c, const void *base) const
|
||||||
|
|
Loading…
Reference in New Issue