Gio News, February 2021

Message ID
DKIM signature
Download raw message
Hello Gioverse!

Another exciting month of development has come and gone, and I've come
again to tell you about all of the awesome stuff our community

core gio

In the time since the last newsletter, Elias has mostly been working
on the compute renderer's CPU fallback. It's working on amd64
(x86_64), and he is making progress towards arm/arm64 support. After
that will be work to optimize the performance of the fallback in

Additionally, tons of great improvements have gone into core:

- Elias:
  - fixed a GPU stall issue on iOS that was reported by Andrew Thorp
and Elizabeth Abowd and bisected by yours truly.
  - made many lower-level changes to support better image rendering
and eliminated path gaps in the compute renderer.
  - fixed a bug that added artificial latency to reading the clipboard
on Wayland-based desktops.
- Paulo Melo:
  - added methods to generate button clicks programmatically.
  - made the default background color of WASM gio applications
transparent. This allows for overlaying Gio atop other page content.
- I updated the editor widget default text highlighting color to make
it more readable.
- Pierre Curto:
  - added support for the "grab" cursor.
  - removed some unused code.
  - improved the performance of the io event router.
- Veikko Sariola fixed a problem with the widget.Float state type that
made it act nonsensically when the minimum value was nonzero.
- Lucas Rodrigues:
  - fixed an Android packaging error that corrupted icons and other
resources in APK builds.
  - added flags to gogio to allow specifying release signing keys
(instead of always using the debug keystore).
  - bumped the gogio default minimum SDK version to 30.
- Egon Elbre:
  - fixed a bug related to negative pointer area dimensions.
  - added support for Windows compute shader compilation. This is the
first step in enabling the compute backend for Windows hosts. The next
steps are adding the relevant Windows API calls and integrating this
into the Gio directX backend.


The examples have been updated to work with the latest gio version.
Additionally, Ihor Palamarchuk fixed the tabs example to properly
respect system insets on Android, and Peter Sanford did the same for
the kitchen example.

gio application design

Jack Mordaunt has developed an interesting approach to Gio application
state management. He leverages the synchronous nature of the frame
redraw loop to
eliminate a lot of state management boilerplate. You can read all about it
(with sample code) here:


I've also stumbled across a pattern that I quite like for dispatching
expensive computation that is derived from UI state. In my particular
case, it's visualizing the results of a Prometheus query, but it could
be practically anything.

The core is a strategy for dispatching goroutine workers that will
always work on and return the latest input value that they can,
discarding earlier inputs to reach the latest one. The core type, a
latest.Chan, is implemented here:


I've also created a "work queue" type that launches a goroutine to
process from one of these latest.Chans and return results on one. The
result is a worker goroutine that will never block unless it has no
work to do. It will overwrite its last iteration's results if it is
unable to send the new ones. Sending work to it is also nonblocking,
and will also overwrite work that it hasn't picked up yet. I find this
pattern quite useful, and I hope you may as well. The worker code is


Reach out to me via email, slack, or arbor if you have thoughts to share.

got reload?

The stateful hot reload tooling that Larry Clapp and I demonstrated
during the last community call has advanced some. You can run the
demos much more simply now, and one of them is a good way to explore
the dynamic behavior of layout.Flex. See our README for details:



I'd like to thank Zhao Wang and Pierre Curto for choosing to sponsor
my work on Gio and related projects this month!

If Gio provides value to you, please consider sponsoring one or more of
its developers/maintainers.

Elias Naur:

Chris Waldon:

call for presentations

If you'd like to present any of your Gio-related work during the
next Gio community call, please reach out to me.

You can find recordings of previous Gio community calls here:


the end

Thanks for reading! Please reach out if you'd like your work included
in future newsletters.

Chris Waldon
Reply to thread Export thread (mbox)