mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
internal/graphicscommand: bug fix: flush image buffers
This is basically a revert for 4d5b608d0c
.
This caused a crash on Windows.
Even after this fix, the browser tests seem no longer flaky, but
I am not 100% sure.
Updates #2391
Closes #2423
This commit is contained in:
parent
f89f99a2bc
commit
d6910eb9ab
@ -250,13 +250,7 @@ func (q *commandQueue) flush(graphicsDriver graphicsdriver.Graphics, endFrame bo
|
||||
// FlushCommands flushes the command queue and present the screen if needed.
|
||||
// If endFrame is true, the current screen might be used to present.
|
||||
func FlushCommands(graphicsDriver graphicsdriver.Graphics, endFrame bool) error {
|
||||
// Flush image buffers only when the frame ends.
|
||||
// Flushing them in tests might cause test flakiness on browsers (#2391).
|
||||
// TODO: Investigate why.
|
||||
if endFrame {
|
||||
flushImageBuffers()
|
||||
}
|
||||
|
||||
return theCommandQueue.Flush(graphicsDriver, endFrame)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user