From 4d66669a9e06defe86de6b25c7bd38d23947e72a Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Wed, 7 Aug 2019 16:21:50 +0200 Subject: [PATCH] app/internal/gpu: rename opClip to clipOp To better match ClipOp, which was renamed from OpClip. Signed-off-by: Elias Naur --- ui/app/internal/gpu/gpu.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/app/internal/gpu/gpu.go b/ui/app/internal/gpu/gpu.go index 1f2521b6..104c1d41 100644 --- a/ui/app/internal/gpu/gpu.go +++ b/ui/app/internal/gpu/gpu.go @@ -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))