forked from joejulian/gio
app: merge app/internal/wm into package app
The app and app/internal/wm packages are tightly coupled, requiring quite a bit of forwarding types, values and constants from the internal package to export it. Further, no other package imports package wm. This change merges the two packages. While here, drop the pre-Go 1.14 SIGPIPE workaround. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+3
-4
@@ -7,7 +7,6 @@ import (
|
||||
"image/color"
|
||||
"runtime"
|
||||
|
||||
"gioui.org/app/internal/wm"
|
||||
"gioui.org/gpu"
|
||||
"gioui.org/op"
|
||||
)
|
||||
@@ -17,7 +16,7 @@ type renderLoop struct {
|
||||
drawing bool
|
||||
err error
|
||||
|
||||
ctx wm.Context
|
||||
ctx context
|
||||
frames chan frame
|
||||
results chan frameResult
|
||||
ack chan struct{}
|
||||
@@ -35,7 +34,7 @@ type frameResult struct {
|
||||
err error
|
||||
}
|
||||
|
||||
func newLoop(ctx wm.Context) (*renderLoop, error) {
|
||||
func newLoop(ctx context) (*renderLoop, error) {
|
||||
l := &renderLoop{
|
||||
ctx: ctx,
|
||||
frames: make(chan frame),
|
||||
@@ -52,7 +51,7 @@ func newLoop(ctx wm.Context) (*renderLoop, error) {
|
||||
return l, nil
|
||||
}
|
||||
|
||||
func (l *renderLoop) renderLoop(ctx wm.Context) error {
|
||||
func (l *renderLoop) renderLoop(ctx context) error {
|
||||
// GL Operations must happen on a single OS thread, so
|
||||
// pass initialization result through a channel.
|
||||
initErr := make(chan error)
|
||||
|
||||
Reference in New Issue
Block a user