mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 08:55:35 +00:00
op/clip,gpu,internal/scene: encode cubic bézier curves natively
The compute renderer supports cubic curves, so encode them as such. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -706,6 +706,13 @@ func encodePath(pathData []byte, stroke clip.StrokeStyle, dashes dashOp) encoder
|
||||
}
|
||||
hasPrev = true
|
||||
prevTo = to
|
||||
case scene.OpFillCubic:
|
||||
from, _, _, to := scene.DecodeCubic(cmd)
|
||||
if hasPrev && from != prevTo {
|
||||
enc.scene[len(enc.scene)-1][0] |= (flagEndPath << 16)
|
||||
}
|
||||
hasPrev = true
|
||||
prevTo = to
|
||||
default:
|
||||
panic("unsupported path scene command")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user