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
+6 -4
View File
@@ -4,17 +4,19 @@ package gpu
import (
"time"
"gioui.org/gpu/backend"
)
type timers struct {
backend Backend
backend backend.Device
timers []*timer
}
type timer struct {
Elapsed time.Duration
backend Backend
timer Timer
backend backend.Device
timer backend.Timer
state timerState
}
@@ -26,7 +28,7 @@ const (
timerWaiting
)
func newTimers(b Backend) *timers {
func newTimers(b backend.Device) *timers {
return &timers{
backend: b,
}