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:
Elias Naur
2021-03-11 15:58:33 +01:00
parent eb9bf60b09
commit a369c408f9
5 changed files with 103 additions and 57 deletions
+4
View File
@@ -18,6 +18,10 @@ func DecodeCommand(d []byte) scene.Command {
return cmd
}
func EncodeCommand(out []byte, cmd scene.Command) {
copy(out, byteslice.Uint32(cmd[:]))
}
func DecodeTransform(data []byte) (t f32.Affine2D) {
if opconst.OpType(data[0]) != opconst.TypeTransform {
panic("invalid op")