Commit Graph

11 Commits

Author SHA1 Message Date
Nigel Tao d1d3d8a5a0 exp/audio/al: delete a debugging log message.
This was accidentally introduced in
https://go-review.googlesource.com/#/c/11351/

Change-Id: Icc9bc9ccb97e48d376e0da440b72631e605a0a15
Reviewed-on: https://go-review.googlesource.com/11608
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
2015-06-29 04:33:40 +00:00
Nigel Tao b6ec031d27 exp/audio/al: call log.Fatalf for a dlsym failure.
Change-Id: I197e101f2b93c2aa9dc69cb697afa68a69142783
Reviewed-on: https://go-review.googlesource.com/11537
Reviewed-by: Burcu Dogan <jbd@google.com>
2015-06-29 01:50:48 +00:00
Nigel Tao 42f0d17876 app: use one thread for both GL and other UI C code.
This change will break Darwin. I have only built and tested this on
desktop linux and Android linux. A follow-up CL will fix Darwin.

Currently, OpenGL gets its own thread, and UI C code (e.g. the Android
event loop, or the X11 event loop) gets its own thread. This relies on
multiple system-provided UI-related C libraries working nicely together,
even when running on different threads. Keeping all the C code on the
one thread seems more sound.

As side-effects:
  - In package app/debug, DrawFPS now takes an explicit Config.
  - In package app, some callbacks now take an explicit Config.
  - In package exp/sprite, Render now takes an explicit Config.
  - In package event, there are new events (Config, Draw, Lifecycle),
    and an event filter mechanism to replace multiple app Callbacks.
  - In package geom, the deprecated Width, Height and PixelsPerPt global
    variables were removed in favor of an event.Config that is
    explicitly passed around (and does not require mutex-locking).
    Converting a geom.Pt to pixels now requires passing a pixelsPerPt.
  - In package gl, the Do, Start and Stop functions are removed, as well
    as the need to call Start in its own goroutine. There is no longer a
    separate GL thread. Instead, package app explicitly performs any GL
    work (gl.DoWork) when some is available (gl.WorkAvailable).
  - In package gl/glutil, Image.Draw now takes an explicit Config.

Callbacks are no longer executed on 'the UI thread'.

Changing the app programming model from callbacks to events (since a
channel of events works with select) will be a follow-up change.

Change-Id: Id9865cd9ee1c45a98c613e9021a63c17226a64b1
Reviewed-on: https://go-review.googlesource.com/11351
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-06-26 07:43:17 +00:00
Burcu Dogan 0a8a8b8cb6 exp/audio/al,cmd/gomobile: fix the broken build
Change-Id: Ia2da7d987f253c11a62843f54051c9d18c1612b5
Reviewed-on: https://go-review.googlesource.com/11521
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2015-06-26 07:40:05 +00:00
Burcu Dogan 25dc511cde exp/audio: allow multiple instances of al.Context
Fixes golang/go#11299.

Change-Id: Ie59981a0515abcf015c7b22d05d2cdbb8be35f56
Reviewed-on: https://go-review.googlesource.com/11315
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2015-06-26 06:57:01 +00:00
Nigel Tao 229b9af752 exp/sprite/portable: unbreak test.
The test was broken with the foo -> exp/foo move.

Change-Id: Ie2bdf54f6da0365d2e0332bcacdd2b7a000c950c
Reviewed-on: https://go-review.googlesource.com/11392
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-06-24 23:49:55 +00:00
Burcu Dogan 1d641b5393 audio: move to exp/audio
Change-Id: I8640b1a38a292972db6dd00506e38c89470b2c15
Reviewed-on: https://go-review.googlesource.com/11311
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2015-06-21 18:18:56 +00:00
Burcu Dogan e9faa8965b sensor: move to exp/sensor
Change-Id: I707a1555952355ccdd5e851062c4749dc94544eb
Reviewed-on: https://go-review.googlesource.com/11312
Reviewed-by: Nigel Tao <nigeltao@golang.org>
2015-06-21 07:47:51 +00:00
Nigel Tao c0c696a96d sprite: move to exp/sprite.
Change-Id: Idfdc0c192d7e6d50e1063b2eb582bbe05294643a
Reviewed-on: https://go-review.googlesource.com/11230
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-06-21 03:08:52 +00:00
Nigel Tao 981e383923 font: move to exp/font.
Change-Id: I62d5bcd829cb35e13843586b25829938778c79f5
Reviewed-on: https://go-review.googlesource.com/11133
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-06-16 21:35:30 +00:00
Nigel Tao 93e2526d55 exp: add a new directory for experimental packages.
Change-Id: I80ebfa6c7e79c1985262fe1572a927ce60df6946
Reviewed-on: https://go-review.googlesource.com/11118
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-06-16 21:06:44 +00:00