diff options
Diffstat (limited to 'src/pkg/exp/nacl/av')
-rw-r--r-- | src/pkg/exp/nacl/av/av.go | 20 | ||||
-rw-r--r-- | src/pkg/exp/nacl/av/image.go | 12 |
2 files changed, 8 insertions, 24 deletions
diff --git a/src/pkg/exp/nacl/av/av.go b/src/pkg/exp/nacl/av/av.go index 4c6312552..12801c631 100644 --- a/src/pkg/exp/nacl/av/av.go +++ b/src/pkg/exp/nacl/av/av.go @@ -54,25 +54,17 @@ type Window struct { // *Window implements draw.Context var _ draw.Context = (*Window)(nil) -func (w *Window) KeyboardChan() <-chan int { - return w.kbdc; -} +func (w *Window) KeyboardChan() <-chan int { return w.kbdc } func (w *Window) MouseChan() <-chan draw.Mouse { return w.mousec; } -func (w *Window) QuitChan() <-chan bool { - return w.quitc; -} +func (w *Window) QuitChan() <-chan bool { return w.quitc } -func (w *Window) ResizeChan() <-chan bool { - return w.resizec; -} +func (w *Window) ResizeChan() <-chan bool { return w.resizec } -func (w *Window) Screen() draw.Image { - return w.Image; -} +func (w *Window) Screen() draw.Image { return w.Image } // Init initializes the Native Client subsystems specified by subsys. // Init must be called before using any of the other functions @@ -223,9 +215,7 @@ var bridge struct { // so this blocks. Once the bridge is ready, multimediaBridge.Run // will drop a value into the channel. Then any calls // to waitBridge will finish, taking the value out and immediately putting it back. -func waitBridge() { - bridge.c <- <-bridge.c; -} +func waitBridge() { bridge.c <- <-bridge.c } const eqsize = 64 diff --git a/src/pkg/exp/nacl/av/image.go b/src/pkg/exp/nacl/av/image.go index 8bc8fd07b..e92ca8aeb 100644 --- a/src/pkg/exp/nacl/av/image.go +++ b/src/pkg/exp/nacl/av/image.go @@ -22,9 +22,7 @@ type Image struct { var _ image.Image = (*Image)(nil) -func (m *Image) ColorModel() image.ColorModel { - return ColorModel; -} +func (m *Image) ColorModel() image.ColorModel { return ColorModel } func (m *Image) Width() int { if len(m.Pixel) == 0 { @@ -33,13 +31,9 @@ func (m *Image) Width() int { return len(m.Pixel[0]); } -func (m *Image) Height() int { - return len(m.Pixel); -} +func (m *Image) Height() int { return len(m.Pixel) } -func (m *Image) At(x, y int) image.Color { - return m.Pixel[y][x]; -} +func (m *Image) At(x, y int) image.Color { return m.Pixel[y][x] } func (m *Image) Set(x, y int, color image.Color) { if c, ok := color.(Color); ok { |