mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 15:45:38 +00:00
759b7962838e78d171ce24b9fef10f4cb9c74c8c
Using Window.Invalidate for animation with, say var w Window var e FrameEvent w.Invalidate() e.Frame(...) stops and immediately starts animation mode which is inefficient and may cause jitter in the redraw timing. InvalidateOp is the efficient and sure way to achieve smooth animation, and Invalidate only exists for external events where there is nowhere to add an InvalidateOp. We can do better, so this change makes Invalidate almost as efficient as InvalidateOp by checking for Invalidates at the same time we check for InvalidateOps. Note that we can't avoid the inefficiency in all cases, for example when the calls above are swapped, e.Frame(...) w.Invalidate() the Invalidate may not be registered before the check during Frame. While here, add a note to Invalidate that it's meant for externally triggered redraws. Signed-off-by: Elias Naur <mail@eliasnaur.com>
Gio
Immediate mode GUI programs in Go for Android, iOS, macOS, Linux, FreeBSD, OpenBSD, Windows, and WebAssembly (experimental). See the project page gioui.org for documentation and more information.
Issues
File bugs and TODOs through the issue tracker or send an email to ~eliasnaur/gio@todo.sr.ht. For general discussion, use the mailing list: ~eliasnaur/gio@lists.sr.ht.
Contributing
Post discussion to the mailing list and patches to gio-patches. No Sourcehut account is required and you can post without being subscribed.
See the contribution guide for more details.
An official GitHub mirror is available.
Description
Languages
Go
89.6%
C
7%
Java
1.7%
Objective-C
1.6%