gpu/backend: move backend interface types to a separate package

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-02-23 12:46:17 +01:00
parent 50e98d1e13
commit 5cd5d49108
17 changed files with 214 additions and 206 deletions
+3 -3
View File
@@ -4,7 +4,7 @@ package headless
import (
"gioui.org/app/internal/glimpl"
"gioui.org/gpu"
"gioui.org/gpu/backend"
"gioui.org/gpu/gl"
)
@@ -22,7 +22,7 @@ type nsContext struct {
prepared bool
}
func newGLContext() (backend, error) {
func newGLContext() (context, error) {
ctx := C.gio_headless_newContext()
return &nsContext{ctx: ctx, c: new(glimpl.Functions)}, nil
}
@@ -40,7 +40,7 @@ func (c *nsContext) ReleaseCurrent() {
C.gio_headless_clearCurrentContext(c.ctx)
}
func (c *nsContext) Backend() (gpu.Backend, error) {
func (c *nsContext) Backend() (backend.Device, error) {
return gl.NewBackend(c.c)
}