gpu: Merge GPU.Collect and GPU.Frame

There's no meaningful reason to have them separate. The intention was to
enable rendering concurrent with other processing, but that's gaining
framerate at the expense of input latency and complicating ImageOp
semantics.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2021-08-24 08:25:10 +02:00
parent 7acc031ccf
commit 414be0a0b3
6 changed files with 22 additions and 40 deletions
+1 -2
View File
@@ -109,8 +109,7 @@ func (w *Window) Release() {
func (w *Window) Frame(frame *op.Ops) error {
return contextDo(w.ctx, func() error {
w.gpu.Clear(color.NRGBA{})
w.gpu.Collect(w.size, frame)
return w.gpu.Frame(driver.RenderTarget(w.fbo))
return w.gpu.Frame(frame, driver.RenderTarget(w.fbo), w.size)
})
}