[gsubgpos] Document caching

This commit is contained in:
Behdad Esfahbod 2022-06-07 09:20:27 -06:00
parent 5963cf4469
commit c8fb048f79
1 changed files with 8 additions and 1 deletions

View File

@ -894,7 +894,14 @@ struct hb_accelerate_subtables_context_t :
array.push (entry);
// Cache handling
/* Cache handling
*
* We allow one subtable from each lookup to use a cache. The assumption
* being that multiple subtables of the same lookup cannot use a cache
* because the resources they would use will collide. As such, we ask
* each subtable to tell us how much it costs (which a cache would avoid),
* and we allocate the cache opportunity to the costliest subtable.
*/
unsigned cost = cache_cost (obj, hb_prioritize);
if (cost > cache_user_cost && !array.in_error ())
{