mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 18:05:35 +00:00
app/internal/gpu: rename opClip to clipOp
To better match ClipOp, which was renamed from OpClip. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -119,12 +119,12 @@ type material struct {
|
|||||||
uvOffset f32.Point
|
uvOffset f32.Point
|
||||||
}
|
}
|
||||||
|
|
||||||
// opClip structure must match opClip in package ui/draw.
|
// clipOp is the shadow of draw.ClipOp.
|
||||||
type opClip struct {
|
type clipOp struct {
|
||||||
bounds f32.Rectangle
|
bounds f32.Rectangle
|
||||||
}
|
}
|
||||||
|
|
||||||
func (op *opClip) decode(data []byte) {
|
func (op *clipOp) decode(data []byte) {
|
||||||
if opconst.OpType(data[0]) != opconst.TypeClip {
|
if opconst.OpType(data[0]) != opconst.TypeClip {
|
||||||
panic("invalid op")
|
panic("invalid op")
|
||||||
}
|
}
|
||||||
@@ -139,7 +139,7 @@ func (op *opClip) decode(data []byte) {
|
|||||||
Y: math.Float32frombits(bo.Uint32(data[13:])),
|
Y: math.Float32frombits(bo.Uint32(data[13:])),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
*op = opClip{
|
*op = clipOp{
|
||||||
bounds: r,
|
bounds: r,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -656,7 +656,7 @@ loop:
|
|||||||
aux = encOp.Data[opconst.TypeAuxLen:]
|
aux = encOp.Data[opconst.TypeAuxLen:]
|
||||||
auxKey = encOp.Key
|
auxKey = encOp.Key
|
||||||
case opconst.TypeClip:
|
case opconst.TypeClip:
|
||||||
var op opClip
|
var op clipOp
|
||||||
op.decode(encOp.Data)
|
op.decode(encOp.Data)
|
||||||
off := state.t.Transform(f32.Point{})
|
off := state.t.Transform(f32.Point{})
|
||||||
state.clip = state.clip.Intersect(op.bounds.Add(off))
|
state.clip = state.clip.Intersect(op.bounds.Add(off))
|
||||||
|
|||||||
Reference in New Issue
Block a user