mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
gpu: [compute] skip encoding roundtrip for path data
Since clip.Path now encodes paths in the format expected by elements.comp, use that data directly instead of a roundtrip through drawOps.buildVerts. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -133,6 +133,15 @@ func FillImage(index int) Command {
|
||||
}
|
||||
}
|
||||
|
||||
func DecodeLine(cmd Command) (from, to f32.Point) {
|
||||
if cmd[0] != uint32(OpFillLine) {
|
||||
panic("invalid command")
|
||||
}
|
||||
from = f32.Pt(math.Float32frombits(cmd[1]), math.Float32frombits(cmd[2]))
|
||||
to = f32.Pt(math.Float32frombits(cmd[3]), math.Float32frombits(cmd[4]))
|
||||
return
|
||||
}
|
||||
|
||||
func DecodeQuad(cmd Command) (from, ctrl, to f32.Point) {
|
||||
if cmd[0] != uint32(OpFillQuad) {
|
||||
panic("invalid command")
|
||||
|
||||
Reference in New Issue
Block a user