mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 01:15:35 +00:00
gpu: make GPU an interface to prepare for second implementation
While here, merge BeginFrame and EndFrame; the split was done for performance reasons, yet never measured. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+4
-3
@@ -88,10 +88,11 @@ func (l *renderLoop) renderLoop(ctx window.Context) error {
|
||||
g.Collect(frame.viewport, frame.ops)
|
||||
// Signal that we're done with the frame ops.
|
||||
l.ack <- struct{}{}
|
||||
g.BeginFrame()
|
||||
var res frameResult
|
||||
res.err = ctx.Present()
|
||||
g.EndFrame()
|
||||
res.err = g.Frame()
|
||||
if res.err == nil {
|
||||
res.err = ctx.Present()
|
||||
}
|
||||
res.profile = g.Profile()
|
||||
ctx.Unlock()
|
||||
l.results <- res
|
||||
|
||||
Reference in New Issue
Block a user