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:
Elias Naur
2019-06-02 16:43:28 +02:00
parent 9f58ed0fea
commit 1e38eec0ab
15 changed files with 248 additions and 160 deletions
-7
View File
@@ -4,15 +4,8 @@ package path
import (
"unsafe"
"gioui.org/ui/f32"
)
type Path struct {
Vertices []Vertex
Bounds f32.Rectangle
}
// The vertex data suitable for passing to vertex programs.
type Vertex struct {
CornerX, CornerY int16