~eliasnaur/gio

ref: 9f58ed0fea4e7b1f8f69846d8f72bec19390d7ed gio/ui/draw/draw.go -rw-r--r-- 2.9 KiB
ui: let OpsReader keep track of references

Instead of exposing the entire reference slice, return the relevant
references from Next.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
ui: introduce OpColor, a specialized OpImage for uniform colors

To avoid allocating an image.Image for OpImage.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
ui: split OpImage into OpImage and OpDraw

In preparation for an OpColor (and future OpGradient and similar).

Label and Editor no longer take an explicit source image. They
draw with the current image.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
all: delete the ui.Op type

It's no longer used.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
all: serialize ops

Pros:
- Much less per-frame garbage
- Allow future preprocessing of ops while building it
- Much fewer interface calls and pointer chasing
- Allow future serialization of ops for remote rendering

Cons:
- Slightly clumsier API

Signed-off-by: Elias Naur <mail@eliasnaur.com>
all: run goimports

gioui.org/ui was renamed from gioui.org/ui/ui before the release,
but the import order wasn't changed accordingly.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
all: initial import

Signed-off-by: Elias Naur <mail@eliasnaur.com>