[paint] Align deptch/edge count conditions across two backends

This commit is contained in:
Behdad Esfahbod 2023-01-09 12:26:39 -07:00
parent 5f976d86a7
commit 0275151490
2 changed files with 3 additions and 4 deletions

View File

@ -2139,10 +2139,10 @@ struct COLR_accelerator_t : COLR::accelerator_t {
void
hb_paint_context_t::recurse (const Paint &paint)
{
if (unlikely (depth_left <= 0 || edge_count <= 0)) return;
depth_left--;
edge_count--;
if (depth_left > 0 && edge_count > 0)
paint.dispatch (this);
paint.dispatch (this);
depth_left++;
}

View File

@ -90,8 +90,7 @@ struct hb_ft_paint_context_t
void recurse (FT_OpaquePaint paint)
{
if (depth_left <= 0) return;
if (edge_count <= 0) return;
if (unlikely (depth_left <= 0 || edge_count <= 0)) return;
depth_left--;
edge_count--;
_hb_ft_paint (this, paint);