mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +00:00
Revert "app: don't delay FrameEvent.Frame by v-sync latency"
This reverts commit 38ff78df5d, because
it broke OpenGL by moving eglSwapBuffers outside the MakeCurrent
context scope.
Fixes: https://todo.sr.ht/~eliasnaur/gio/393
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+4
-4
@@ -248,7 +248,10 @@ func (w *Window) render(frame *op.Ops, viewport image.Point) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return w.gpu.Frame(frame, target, viewport)
|
if err := w.gpu.Frame(frame, target, viewport); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
return w.ctx.Present()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (w *Window) processFrame(d driver, frameStart time.Time) {
|
func (w *Window) processFrame(d driver, frameStart time.Time) {
|
||||||
@@ -805,9 +808,6 @@ func (w *Window) processEvent(d driver, e event.Event) {
|
|||||||
// We're done with frame, let the client continue.
|
// We're done with frame, let the client continue.
|
||||||
w.frameAck <- struct{}{}
|
w.frameAck <- struct{}{}
|
||||||
}
|
}
|
||||||
if err == nil && w.gpu != nil {
|
|
||||||
err = w.ctx.Present()
|
|
||||||
}
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
w.destroyGPU()
|
w.destroyGPU()
|
||||||
w.out <- system.DestroyEvent{Err: err}
|
w.out <- system.DestroyEvent{Err: err}
|
||||||
|
|||||||
Reference in New Issue
Block a user