3129 Commits

Author SHA1 Message Date
Elias Naur 51482b6493 ui/app/internal/gpu: move sRGBA feature detection to context
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-10 17:50:06 +02:00
Elias Naur fd9eb029c8 ui/app/internal/gpu: drop opaque texture optimization
It doesn't seem worth the trouble: images must be scanned for
alpha != 1 and GPUs don't like RGB formats. Use RGBA always.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-08 17:57:10 +02:00
Elias Naur 871ae34be5 ui/app/internal/gl: move single channel format detection to context
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-08 17:57:10 +02:00
Elias Naur f5fa968038 ui/app/internal/gpu: implement OpenGL ES 2 float fbo fallbacks
Also applicable to WebGL.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-08 17:57:10 +02:00
Elias Naur d118bd5a88 ui/app/internal/gpu: introduce caps and context
Enables graceful fallback to OpenGL ES 2 and WebGL.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-08 17:57:10 +02:00
Elias Naur 8df5feeeea ui/app: make opengl objects structs
WebGL use opaque values for object handles, not integers. To ensure
portability, wrap handle types with a struct.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-08 17:57:10 +02:00
Elias Naur 2af0f63cfb ui/app/internal/gl: parse WebGL versions
And drop a redundant error message while here.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-08 17:57:09 +02:00
Elias Naur 2d7fb556a4 ui/test: invalidate Editor layout on scale changes
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-08 17:57:09 +02:00
Elias Naur 350dc19108 ui/app/internal/gl: invalidate the correct fbo in sRGB fallback
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-08 14:28:43 +02:00
Elias Naur af46b2bf29 cmd/gio: remove NDK r19b Windows workaround vestiges
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-08 14:28:43 +02:00
Elias Naur 78421b9db9 website: add go-source meta tag to link godoc.org to sr.ht repository
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-05 21:01:41 +02:00
Elias Naur 967484ce3a apps/hello: fix error handling
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-05-02 17:28:32 +02:00
Elias Naur 20f55a4ad7 all: delete the ui.Op type
It's no longer used.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-27 22:27:50 +02:00
Elias Naur 56133632c6 ui/layout: rename simple.go to layout.go
A more appropriate name.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-27 22:24:20 +02:00
Elias Naur f60906b8e2 apps: go get gioui.org/ui
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-27 22:23:17 +02:00
Elias Naur 252e058766 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>
2019-04-27 22:19:34 +02:00
Elias Naur 7b6e1ce35a ui/pointer: simplify hit testing
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>
2019-04-26 19:26:59 +02:00
Elias Naur a8bb3c2f14 all: make pointer.Area an interface
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>
2019-04-25 10:02:14 +02:00
Elias Naur 3ad94ed20e ui/app: don't draw when not animating (Wayland)
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-25 10:02:14 +02:00
Elias Naur e0d586893d ui/app/internal/gpu: flush before drawing
And delete an unnecessary error check from Flush to make sure pending
draws are always finalized.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-25 10:01:58 +02:00
Elias Naur 47fbe56766 apps: go get gioui.org
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-17 12:46:37 +02:00
Elias Naur 8b47e2b4bf ui/app: don't use wl_touch interface v6
It's not tested, we don't need v6 capabilities and using them result
in build errors on older wayland clients:

https://www.reddit.com/r/golang/comments/b7rujg/gio_by_elias_naur_et_al_portable_immediate_mode/ejv804z/

Finally, since we request v5 of the parent wl_seat, the wl_touch instances
returned to us is capped at v5 anyway.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-17 12:42:18 +02:00
Elias Naur d4ff577259 README.md: add download link to Go
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-07 18:27:53 +02:00
Elias Naur ef20c9339f cmd/gio: drop 32-bit support for iOS
64-bit support was added in iOS 8 on iPhone 5S and newer,
32-bit support was dropped from iOS 12.

Gio is new and we have an opportunity to see if we can live without it.
We can always add 32-bit support back; it's harder to break users
later.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-06 16:37:26 +02:00
Elias Naur afa91ed942 README.md: note that the NVIDIA proprietary driver doesn't work
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-05 19:40:15 +02:00
Elias Naur f4f3f9e640 app/hello: add explicit WindowOptions, extract message, color text
Signed-off-by: Anthony Starks <ajstarks@gmail.com>
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-05 14:59:39 +02:00
Elias Naur b5d8e1cfe2 README.md: describe name and email configuration
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-05 11:27:17 +02:00
Elias Naur c20255335f README.md: point to git-send-email.io
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-05 11:10:07 +02:00
Elias Naur a876ce8a53 README.md: further clarify the mailing list description
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-03 17:02:55 +02:00
Elias Naur 31e06bd931 README.md: note that the mailing list is open to everyone
A Sourcehut account is only required for subscribing to new posts.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-03 14:57:45 +02:00
Elias Naur 23c5bbdf48 apps: go get gioui.org/ui@latest && go mod tidy
go get -u gioui.org/ui also upgrades indirect dependencies, which
we don't want.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-03 14:52:10 +02:00
Elias Naur 6f40e80bc2 apps: go get -u gioui.org/ui && go mod tidy
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-03 13:18:25 +02:00
Elias Naur b15ec53a03 ui/app: fix display link on iOS 10
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>
2019-04-03 13:13:53 +02:00
Elias Naur fca780972a README.md: add note about commit message style
And move the issues section above the heavy contribution section
while we're here.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-03 12:19:16 +02:00
Wiktor Kwapisiewicz 2a99e1c955 README.md: fix git commit signoff command
Signed-off-by: Wiktor Kwapisiewicz <wiktor@metacode.biz>
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-03 12:05:01 +02:00
Elias Naur 1096ac1938 apps/gophers: update commits page config every frame
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-02 21:46:41 +02:00
Elias Naur 962736cbbf apps/gophers: go back on CommandBack
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-02 21:06:30 +02:00
Elias Naur fc55c6ee5c ui/app: implement Command for system events
And add CommandBack for the Android back button.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-02 21:04:48 +02:00
Elias Naur 6bd5b73154 apps: go get -u gioui.org/ui && go mod tidy
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-02 19:55:53 +02:00
Elias Naur ed2590e30e ui/app,apps/gophers,apps/hello: revert NewWindow to CreateWindow
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>
2019-04-02 19:54:37 +02:00
Elias Naur 6899f96532 apps: go get -u gioui.org/ui && go mod tidy
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-02 18:59:45 +02:00
Elias Naur e7725a4fa1 apps,ui/app: delete ui/app.Window.Ack
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>
2019-04-02 18:51:43 +02:00
Elias Naur abb9d291e9 ui/app: don't buffer the app event channel
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>
2019-04-02 17:22:58 +02:00
Elias Naur 48b6a73753 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>
2019-04-02 17:09:06 +02:00
Elias Naur fc7c5c13f4 README.md: add EGL development package to Linux requirements
Updates ~eliasnaur/gio#3

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-02 12:52:08 +02:00
Elias Naur 3b8cbc605e README.md: add missing word
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-02 12:49:04 +02:00
Elias Naur d18b6b39fe README.md: expand contributing section and add issues section
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-02 12:45:25 +02:00
Elias Naur 641c3b7279 README.md: add missing GLES dependency
Fixes ~eliasnaur/gio#3

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-02 08:38:57 +02:00
Elias Naur eaae45d87a README.md: add setup instructions for Ubuntu
And add minimum versions for Ubuntu and Fedora.

Fixes ~eliasnaur/gio/2

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-01 18:46:44 +02:00
Elias Naur 05d337d695 README.md: add Fedora instructions for installing dependencies
Updates ~eliasnaur/gio/2

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-04-01 18:29:22 +02:00