23a839a29d27c27c50efaa4fd3479308a0a90f97 — Elias Naur 6 months ago f655027
widget: clip by most complex shape last

In the new compute renderer, clipping to a complex shape is slower than
filling it. Swap the clip shapes for drawing text so that the text shape
itself is last, and therefore used for filling.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
1 files changed, 1 insertions(+), 1 deletions(-)

M widget/label.go
M widget/label.go => widget/label.go +1 -1
@@ 178,8 178,8 @@ func (l Label) Layout(gtx layout.Context, s text.Shaper, font text.Font, size un
		stack := op.Save(gtx.Ops)
		s.Shape(font, textSize, l).Add(gtx.Ops)
		s.Shape(font, textSize, l).Add(gtx.Ops)