mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +00:00
ui: build paths as ops
Instead of allocating and constructing a clip path, store path data directly in op lists. Use separate op lists for cached text layout paths. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -179,7 +179,7 @@ func (l *List) Layout(ops *ui.Ops) Dimens {
|
||||
Max: axisPoint(l.Axis, max, ui.Inf),
|
||||
}
|
||||
ui.OpPush{}.Add(ops)
|
||||
draw.OpClip{Path: draw.RectPath(r)}.Add(ops)
|
||||
draw.RectClip(ops, r)
|
||||
ui.OpTransform{
|
||||
Transform: ui.Offset(toPointF(axisPoint(l.Axis, pos, cross))),
|
||||
}.Add(ops)
|
||||
|
||||
Reference in New Issue
Block a user