From 4d5b608d0cd498e592aadec60d40352d53f09e87 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 16 Oct 2022 17:55:21 +0900 Subject: [PATCH] internal/graphicscommand: bug fix: suppress test flakiness on browsers Closes #2391 --- internal/graphicscommand/command.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/graphicscommand/command.go b/internal/graphicscommand/command.go index 63e1703aa..7552fb265 100644 --- a/internal/graphicscommand/command.go +++ b/internal/graphicscommand/command.go @@ -249,7 +249,12 @@ 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 { - resolveImages() + // 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, endFrame) }