app: fix x11.go broken after cl/15460.
Fixes golang/go#12911 Note: the x11 support seems outdated in general compared to android, darwin versions. Change-Id: I2a80215c62b8c3cf87c5eb054184fea10819abc9 Reviewed-on: https://go-review.googlesource.com/15790 Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
d19d328d7b
commit
5c6636dcb9
@ -32,7 +32,6 @@ import (
|
||||
"golang.org/x/mobile/event/size"
|
||||
"golang.org/x/mobile/event/touch"
|
||||
"golang.org/x/mobile/geom"
|
||||
"golang.org/x/mobile/gl"
|
||||
)
|
||||
|
||||
func init() {
|
||||
@ -42,9 +41,7 @@ func init() {
|
||||
func main(f func(App)) {
|
||||
runtime.LockOSThread()
|
||||
|
||||
var worker gl.Worker
|
||||
glctx, worker = gl.NewContext()
|
||||
workAvailable := worker.WorkAvailable()
|
||||
workAvailable := theApp.worker.WorkAvailable()
|
||||
|
||||
C.createWindow()
|
||||
|
||||
@ -71,7 +68,7 @@ func main(f func(App)) {
|
||||
case <-donec:
|
||||
return
|
||||
case <-workAvailable:
|
||||
worker.DoWork()
|
||||
theApp.worker.DoWork()
|
||||
case <-theApp.publish:
|
||||
C.swapBuffers()
|
||||
tc = ticker.C
|
||||
|
Loading…
x
Reference in New Issue
Block a user