~eliasnaur/gio

4d66669a9e06defe86de6b25c7bd38d23947e72a — Elias Naur 8 months ago eaa4efe
app/internal/gpu: rename opClip to clipOp

To better match ClipOp, which was renamed from OpClip.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
1 files changed, 5 insertions(+), 5 deletions(-)

M ui/app/internal/gpu/gpu.go
M ui/app/internal/gpu/gpu.go => ui/app/internal/gpu/gpu.go +5 -5
@@ 119,12 119,12 @@ type material struct {
	uvOffset f32.Point
}

// opClip structure must match opClip in package ui/draw.
type opClip struct {
// clipOp is the shadow of draw.ClipOp.
type clipOp struct {
	bounds f32.Rectangle
}

func (op *opClip) decode(data []byte) {
func (op *clipOp) decode(data []byte) {
	if opconst.OpType(data[0]) != opconst.TypeClip {
		panic("invalid op")
	}


@@ 139,7 139,7 @@ func (op *opClip) decode(data []byte) {
			Y: math.Float32frombits(bo.Uint32(data[13:])),
		},
	}
	*op = opClip{
	*op = clipOp{
		bounds: r,
	}
}


@@ 656,7 656,7 @@ loop:
			aux = encOp.Data[opconst.TypeAuxLen:]
			auxKey = encOp.Key
		case opconst.TypeClip:
			var op opClip
			var op clipOp
			op.decode(encOp.Data)
			off := state.t.Transform(f32.Point{})
			state.clip = state.clip.Intersect(op.bounds.Add(off))