[OTLayout] Add process() tracing
diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh
index 29faa18..86c0d8d 100644
--- a/src/hb-ot-layout-gpos-table.hh
+++ b/src/hb-ot-layout-gpos-table.hh
@@ -503,10 +503,11 @@
template <typename context_t>
inline typename context_t::return_t process (context_t *c) const
{
+ TRACE_PROCESS (this);
switch (u.format) {
- case 1: return c->process (u.format1);
- case 2: return c->process (u.format2);
- default:return c->default_return_value ();
+ case 1: return TRACE_RETURN (c->process (u.format1));
+ case 2: return TRACE_RETURN (c->process (u.format2));
+ default:return TRACE_RETURN (c->default_return_value ());
}
}
@@ -748,10 +749,11 @@
template <typename context_t>
inline typename context_t::return_t process (context_t *c) const
{
+ TRACE_PROCESS (this);
switch (u.format) {
- case 1: return c->process (u.format1);
- case 2: return c->process (u.format2);
- default:return c->default_return_value ();
+ case 1: return TRACE_RETURN (c->process (u.format1));
+ case 2: return TRACE_RETURN (c->process (u.format2));
+ default:return TRACE_RETURN (c->default_return_value ());
}
}
@@ -907,9 +909,10 @@
template <typename context_t>
inline typename context_t::return_t process (context_t *c) const
{
+ TRACE_PROCESS (this);
switch (u.format) {
- case 1: return c->process (u.format1);
- default:return c->default_return_value ();
+ case 1: return TRACE_RETURN (c->process (u.format1));
+ default:return TRACE_RETURN (c->default_return_value ());
}
}
@@ -997,9 +1000,10 @@
template <typename context_t>
inline typename context_t::return_t process (context_t *c) const
{
+ TRACE_PROCESS (this);
switch (u.format) {
- case 1: return c->process (u.format1);
- default:return c->default_return_value ();
+ case 1: return TRACE_RETURN (c->process (u.format1));
+ default:return TRACE_RETURN (c->default_return_value ());
}
}
@@ -1109,9 +1113,10 @@
template <typename context_t>
inline typename context_t::return_t process (context_t *c) const
{
+ TRACE_PROCESS (this);
switch (u.format) {
- case 1: return c->process (u.format1);
- default:return c->default_return_value ();
+ case 1: return TRACE_RETURN (c->process (u.format1));
+ default:return TRACE_RETURN (c->default_return_value ());
}
}
@@ -1219,9 +1224,10 @@
template <typename context_t>
inline typename context_t::return_t process (context_t *c) const
{
+ TRACE_PROCESS (this);
switch (u.format) {
- case 1: return c->process (u.format1);
- default:return c->default_return_value ();
+ case 1: return TRACE_RETURN (c->process (u.format1));
+ default:return TRACE_RETURN (c->default_return_value ());
}
}
@@ -1277,17 +1283,18 @@
template <typename context_t>
inline typename context_t::return_t process (context_t *c, unsigned int lookup_type) const
{
+ TRACE_PROCESS (this);
switch (lookup_type) {
- case Single: return u.single.process (c);
- case Pair: return u.pair.process (c);
- case Cursive: return u.cursive.process (c);
- case MarkBase: return u.markBase.process (c);
- case MarkLig: return u.markLig.process (c);
- case MarkMark: return u.markMark.process (c);
- case Context: return u.context.process (c);
- case ChainContext: return u.chainContext.process (c);
- case Extension: return u.extension.process (c);
- default: return c->default_return_value ();
+ case Single: return TRACE_RETURN (u.single.process (c));
+ case Pair: return TRACE_RETURN (u.pair.process (c));
+ case Cursive: return TRACE_RETURN (u.cursive.process (c));
+ case MarkBase: return TRACE_RETURN (u.markBase.process (c));
+ case MarkLig: return TRACE_RETURN (u.markLig.process (c));
+ case MarkMark: return TRACE_RETURN (u.markMark.process (c));
+ case Context: return TRACE_RETURN (u.context.process (c));
+ case ChainContext: return TRACE_RETURN (u.chainContext.process (c));
+ case Extension: return TRACE_RETURN (u.extension.process (c));
+ default: return TRACE_RETURN (c->default_return_value ());
}
}
@@ -1337,14 +1344,15 @@
template <typename context_t>
inline typename context_t::return_t process (context_t *c) const
{
+ TRACE_PROCESS (this);
unsigned int lookup_type = get_type ();
unsigned int count = get_subtable_count ();
for (unsigned int i = 0; i < count; i++) {
typename context_t::return_t r = get_subtable (i).process (c, lookup_type);
if (c->stop_sublookup_iteration (r))
- return r;
+ return TRACE_RETURN (r);
}
- return c->default_return_value ();
+ return TRACE_RETURN (c->default_return_value ());
}
template <typename set_t>
diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh
index 1a2119d..201ca27 100644
--- a/src/hb-ot-layout-gsub-table.hh
+++ b/src/hb-ot-layout-gsub-table.hh
@@ -193,10 +193,11 @@
template <typename context_t>
inline typename context_t::return_t process (context_t *c) const
{
+ TRACE_PROCESS (this);
switch (u.format) {
- case 1: return c->process (u.format1);
- case 2: return c->process (u.format2);
- default:return c->default_return_value ();
+ case 1: return TRACE_RETURN (c->process (u.format1));
+ case 2: return TRACE_RETURN (c->process (u.format2));
+ default:return TRACE_RETURN (c->default_return_value ());
}
}
@@ -382,9 +383,10 @@
template <typename context_t>
inline typename context_t::return_t process (context_t *c) const
{
+ TRACE_PROCESS (this);
switch (u.format) {
- case 1: return c->process (u.format1);
- default:return c->default_return_value ();
+ case 1: return TRACE_RETURN (c->process (u.format1));
+ default:return TRACE_RETURN (c->default_return_value ());
}
}
@@ -531,9 +533,10 @@
template <typename context_t>
inline typename context_t::return_t process (context_t *c) const
{
+ TRACE_PROCESS (this);
switch (u.format) {
- case 1: return c->process (u.format1);
- default:return c->default_return_value ();
+ case 1: return TRACE_RETURN (c->process (u.format1));
+ default:return TRACE_RETURN (c->default_return_value ());
}
}
@@ -832,9 +835,10 @@
template <typename context_t>
inline typename context_t::return_t process (context_t *c) const
{
+ TRACE_PROCESS (this);
switch (u.format) {
- case 1: return c->process (u.format1);
- default:return c->default_return_value ();
+ case 1: return TRACE_RETURN (c->process (u.format1));
+ default:return TRACE_RETURN (c->default_return_value ());
}
}
@@ -1010,9 +1014,10 @@
template <typename context_t>
inline typename context_t::return_t process (context_t *c) const
{
+ TRACE_PROCESS (this);
switch (u.format) {
- case 1: return c->process (u.format1);
- default:return c->default_return_value ();
+ case 1: return TRACE_RETURN (c->process (u.format1));
+ default:return TRACE_RETURN (c->default_return_value ());
}
}
@@ -1056,16 +1061,17 @@
template <typename context_t>
inline typename context_t::return_t process (context_t *c, unsigned int lookup_type) const
{
+ TRACE_PROCESS (this);
switch (lookup_type) {
- case Single: return u.single.process (c);
- case Multiple: return u.multiple.process (c);
- case Alternate: return u.alternate.process (c);
- case Ligature: return u.ligature.process (c);
- case Context: return u.context.process (c);
- case ChainContext: return u.chainContext.process (c);
- case Extension: return u.extension.process (c);
- case ReverseChainSingle: return u.reverseChainContextSingle.process (c);
- default: return c->default_return_value ();
+ case Single: return TRACE_RETURN (u.single.process (c));
+ case Multiple: return TRACE_RETURN (u.multiple.process (c));
+ case Alternate: return TRACE_RETURN (u.alternate.process (c));
+ case Ligature: return TRACE_RETURN (u.ligature.process (c));
+ case Context: return TRACE_RETURN (u.context.process (c));
+ case ChainContext: return TRACE_RETURN (u.chainContext.process (c));
+ case Extension: return TRACE_RETURN (u.extension.process (c));
+ case ReverseChainSingle: return TRACE_RETURN (u.reverseChainContextSingle.process (c));
+ default: return TRACE_RETURN (c->default_return_value ());
}
}
@@ -1124,14 +1130,15 @@
template <typename context_t>
inline typename context_t::return_t process (context_t *c) const
{
+ TRACE_PROCESS (this);
unsigned int lookup_type = get_type ();
unsigned int count = get_subtable_count ();
for (unsigned int i = 0; i < count; i++) {
typename context_t::return_t r = get_subtable (i).process (c, lookup_type);
if (c->stop_sublookup_iteration (r))
- return r;
+ return TRACE_RETURN (r);
}
- return c->default_return_value ();
+ return TRACE_RETURN (c->default_return_value ());
}
template <typename set_t>
diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh
index 1fbfabd..6be9238 100644
--- a/src/hb-ot-layout-gsubgpos-private.hh
+++ b/src/hb-ot-layout-gsubgpos-private.hh
@@ -1213,11 +1213,12 @@
template <typename context_t>
inline typename context_t::return_t process (context_t *c) const
{
+ TRACE_PROCESS (this);
switch (u.format) {
- case 1: return c->process (u.format1);
- case 2: return c->process (u.format2);
- case 3: return c->process (u.format3);
- default:return c->default_return_value ();
+ case 1: return TRACE_RETURN (c->process (u.format1));
+ case 2: return TRACE_RETURN (c->process (u.format2));
+ case 3: return TRACE_RETURN (c->process (u.format3));
+ default:return TRACE_RETURN (c->default_return_value ());
}
}
@@ -1716,10 +1717,10 @@
{
TRACE_PROCESS (this);
switch (u.format) {
- case 1: return c->process (u.format1);
- case 2: return c->process (u.format2);
- case 3: return c->process (u.format3);
- default:return c->default_return_value ();
+ case 1: return TRACE_RETURN (c->process (u.format1));
+ case 2: return TRACE_RETURN (c->process (u.format2));
+ case 3: return TRACE_RETURN (c->process (u.format3));
+ default:return TRACE_RETURN (c->default_return_value ());
}
}