From 13d28f50e5509e39b3a596726d599921ece8b927 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 30 Oct 2022 03:40:39 +0900 Subject: [PATCH] internal/graphicscommand: always flush buffers After #2423 is fixed, buffers should be able to be flushed safely anytime. Updates #2391 Updates #2423 --- internal/graphicscommand/command.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/internal/graphicscommand/command.go b/internal/graphicscommand/command.go index bff74f987..d85e4592f 100644 --- a/internal/graphicscommand/command.go +++ b/internal/graphicscommand/command.go @@ -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.