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

pull/4015/head
Behdad Esfahbod 2 years ago
parent 5f976d86a7
commit 0275151490
  1. 4
      src/OT/Color/COLR/COLR.hh
  2. 3
      src/hb-ft-colr.hh

@ -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++;
}

@ -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);

Loading…
Cancel
Save