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>
Serialize the implied tree of layers and handlers into a list
that can be traversed from the end to collect handlers.
This change will make it easier to switch op representation in
a follow-up change.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
With an interface instead of anonymous functions, amending an
area's parameters can be done even after adding it to an OpHandler.
This will be useful when we switch to serialized op lists.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
For some reason, the CADisplayLink.paused property didn't work on
iOS 10 but does on iOS 12. Use addToRunLoop and removeFromRunLoop
instead.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
It turns out we already support multiple windows on Android: when
the activity is recreated.
This reverts commit f21b5eb1df.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
Replace it with a dummy event send on the synchronous event channel;
a bit of cleverness for a simpler API.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
We used to buffer input events to allow for batch processing
multiple events before redrawing. Now that redraws are scheduled to
run after the native event queue is empty, buffering is no longer
necessary.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
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>
Gio doesn't support multiple windows anyway, so get rid of the
app.Windows channel and use NewWindow call for the mobile platforms
as well.
Signed-off-by: Elias Naur <mail@eliasnaur.com>