[paint] Optimize PAINT_COMPOSITE
At the start of each paint call the current group is clear. So we don't need to start a new group for the backdrop paint. A paint composite really needs one group push, not two.
This commit is contained in:
parent
5ea5aacda9
commit
d045de78c1
|
@ -1245,12 +1245,10 @@ struct PaintComposite
|
|||
|
||||
void paint_glyph (hb_paint_context_t *c) const
|
||||
{
|
||||
c->funcs->push_group (c->data);
|
||||
c->recurse (this+backdrop);
|
||||
c->funcs->push_group (c->data);
|
||||
c->recurse (this+src);
|
||||
c->funcs->pop_group (c->data, (hb_paint_composite_mode_t) (int) mode);
|
||||
c->funcs->pop_group (c->data, HB_PAINT_COMPOSITE_MODE_SRC_OVER);
|
||||
}
|
||||
|
||||
HBUINT8 format; /* format = 32 */
|
||||
|
|
|
@ -392,12 +392,10 @@ _hb_ft_paint (hb_ft_paint_context_t *c,
|
|||
break;
|
||||
case FT_COLR_PAINTFORMAT_COMPOSITE:
|
||||
{
|
||||
c->funcs->push_group (c->data);
|
||||
c->recurse (paint.u.composite.backdrop_paint);
|
||||
c->funcs->push_group (c->data);
|
||||
c->recurse (paint.u.composite.source_paint);
|
||||
c->funcs->pop_group (c->data, _hb_ft_paint_composite_mode (paint.u.composite.composite_mode));
|
||||
c->funcs->pop_group (c->data, HB_PAINT_COMPOSITE_MODE_SRC_OVER);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue