graph.update_parents (); int limit = 10; for (constauto& o : overflows)
{ if (!limit--) break; constauto& parent = graph.vertices_[o.parent]; constauto& child = graph.vertices_[o.child];
DEBUG_MSG (SUBSET_REPACK, nullptr, " overflow from " "%4u (%4u in, %4u out, space %2u) => " "%4u (%4u in, %4u out, space %2u)",
o.parent,
parent.incoming_edges (),
parent.obj.real_links.length + parent.obj.virtual_links.length,
graph.space_for (o.parent),
o.child,
child.incoming_edges (),
child.obj.real_links.length + child.obj.virtual_links.length,
graph.space_for (o.child));
} if (overflows.length > 10) {
DEBUG_MSG (SUBSET_REPACK, nullptr, " ... plus %u more overflows.", overflows.length - 10);
}
}
template <typename O> inlinevoid
serialize_link_of_type (const hb_serialize_context_t::object_t::link_t& link, char* head,
hb_serialize_context_t* c)
{
OT::Offset<O>* offset = reinterpret_cast<OT::Offset<O>*> (head + link.position);
*offset = 0;
c->add_link (*offset, // serializer has an extra nil object at the start of the // object array. So all id's are +1 of what our id's are.
link.objidx + 1,
(hb_serialize_context_t::whence_t) link.whence,
link.bias);
}
inline void serialize_link (const hb_serialize_context_t::object_t::link_t& link, char* head,
hb_serialize_context_t* c)
{ switch (link.width)
{ case 0: // Virtual links aren't serialized. return; case 4: if (link.is_signed)
{
serialize_link_of_type<OT::HBINT32> (link, head, c);
} else {
serialize_link_of_type<OT::HBUINT32> (link, head, c);
} return; case 2: if (link.is_signed)
{
serialize_link_of_type<OT::HBINT16> (link, head, c);
} else {
serialize_link_of_type<OT::HBUINT16> (link, head, c);
} return; case 3:
serialize_link_of_type<OT::HBUINT24> (link, head, c); return; default: // Unexpected link width.
assert (0);
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.