From d6910eb9aba3cbd7a9d7267da1e386d2c319cbdf Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 30 Oct 2022 02:20:44 +0900 Subject: [PATCH] internal/graphicscommand: bug fix: flush image buffers This is basically a revert for 4d5b608d0cd498e592aadec60d40352d53f09e87. 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 --- internal/graphicscommand/command.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/internal/graphicscommand/command.go b/internal/graphicscommand/command.go index 175fb4a96..568d0a1ae 100644 --- a/internal/graphicscommand/command.go +++ b/internal/graphicscommand/command.go @@ -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() - } - + flushImageBuffers() return theCommandQueue.Flush(graphicsDriver, endFrame) }