ui: rename ops to have Op suffixed, not prefixed

Match Go's FooError name pattern.

While we're here, rename RedrawOp to InvalidateOp.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-06-21 16:59:26 +02:00
parent b981ccf9ed
commit 7aa7bb3be4
21 changed files with 122 additions and 122 deletions
+4 -4
View File
@@ -23,13 +23,13 @@ type PathBuilder struct {
hasBounds bool
}
// OpClip structure must match opClip in package ui/internal/gpu.
// ClipOp structure must match opClip in package ui/internal/gpu.
type OpClip struct {
type ClipOp struct {
bounds f32.Rectangle
}
func (p OpClip) Add(o *ui.Ops) {
func (p ClipOp) Add(o *ui.Ops) {
data := make([]byte, ops.TypeClipLen)
data[0] = byte(ops.TypeClip)
bo := binary.LittleEndian
@@ -278,7 +278,7 @@ func (p *PathBuilder) simpleQuadTo(ctrl, to f32.Point) {
func (p *PathBuilder) End() {
p.end()
OpClip{
ClipOp{
bounds: p.bounds,
}.Add(p.ops)
}