internal/graphicscommand: always flush buffers

After #2423 is fixed, buffers should be able to be flushed safely
anytime.

Updates #2391
Updates #2423
This commit is contained in:
Hajime Hoshi 2022-10-30 03:40:39 +09:00
parent b096ba700a
commit ac61126473

View File

@ -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)
}