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 e51d7ce947
commit 13d28f50e5

View File

@ -273,14 +273,8 @@ func (q *commandQueue) flush(graphicsDriver graphicsdriver.Graphics) error {
// FlushCommands flushes the command queue and present the screen if needed.
func FlushCommands(graphicsDriver graphicsdriver.Graphics, endFrame bool) error {
// Resolve unresolved images only when the frame ends.
// Resolving in tests might cause test flakiness on browsers (#2391).
// TODO: Investigate why.
if endFrame {
resolveImages()
}
return theCommandQueue.Flush(graphicsDriver)
resolveImages()
return theCommandQueue.Flush(graphicsDriver, endFrame)
}
// drawTrianglesCommand represents a drawing command to draw an image on another image.