mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 00:45:35 +00:00
gpu,internal/ops: decode scene commands directly, not through quads
We're about to let clip.Path use more of the compute renderer features (lines, cubic béziers). This change prepares the gpu package for reading one of several commands types, not just the quadratic béziers of before. The old Quad type is still the basis for the stroking algorithms, but this change moves it into package gpu which is the only user. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-3
@@ -11,7 +11,6 @@ import (
|
||||
"sort"
|
||||
|
||||
"gioui.org/f32"
|
||||
"gioui.org/internal/ops"
|
||||
)
|
||||
|
||||
func isSolidLine(sty dashOp) bool {
|
||||
@@ -238,7 +237,7 @@ func (qs strokeQuads) splitAt(contour *uint32, ts ...float64) []strokeQuads {
|
||||
|
||||
oi = append(oi, strokeQuad{
|
||||
contour: *contour,
|
||||
quad: ops.Quad{
|
||||
quad: quadSegment{
|
||||
From: from,
|
||||
Ctrl: q1,
|
||||
To: r0,
|
||||
@@ -256,7 +255,7 @@ func (qs strokeQuads) splitAt(contour *uint32, ts ...float64) []strokeQuads {
|
||||
}
|
||||
oi = append(oi, strokeQuad{
|
||||
contour: *contour,
|
||||
quad: ops.Quad{
|
||||
quad: quadSegment{
|
||||
From: r0,
|
||||
Ctrl: r1,
|
||||
To: r2,
|
||||
|
||||
Reference in New Issue
Block a user