mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
internal/graphicscommand: bug fix: suppress test flakiness on browsers
Closes #2391
This commit is contained in:
parent
475dc6394f
commit
4d5b608d0c
@ -249,7 +249,12 @@ func (q *commandQueue) flush(graphicsDriver graphicsdriver.Graphics, endFrame bo
|
|||||||
// FlushCommands flushes the command queue and present the screen if needed.
|
// FlushCommands flushes the command queue and present the screen if needed.
|
||||||
// If endFrame is true, the current screen might be used to present.
|
// If endFrame is true, the current screen might be used to present.
|
||||||
func FlushCommands(graphicsDriver graphicsdriver.Graphics, endFrame bool) error {
|
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)
|
return theCommandQueue.Flush(graphicsDriver, endFrame)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user