mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 08:25:34 +00:00
Revert "app: release GPU before processing DestroyEvent"
This reverts commit 8620b43eb3.
Releasing the GPU after ack'ing the DestroyEvent is too late.
Updates gio#67
This commit is contained in:
+2
-6
@@ -218,12 +218,6 @@ func (w *Window) run(opts *window.Options) {
|
||||
w.out <- system.DestroyEvent{Err: err}
|
||||
return
|
||||
}
|
||||
defer func() {
|
||||
if w.gpu != nil {
|
||||
w.gpu.Release()
|
||||
w.gpu = nil
|
||||
}
|
||||
}()
|
||||
for {
|
||||
var timer <-chan time.Time
|
||||
if w.delayedDraw != nil {
|
||||
@@ -303,6 +297,8 @@ func (w *Window) run(opts *window.Options) {
|
||||
}
|
||||
if e2.Sync {
|
||||
if err := w.gpu.Flush(); err != nil {
|
||||
w.gpu.Release()
|
||||
w.gpu = nil
|
||||
w.destroy(err)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user