mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-02-05 23:44:31 +01:00
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:
parent
e51d7ce947
commit
13d28f50e5
@ -273,14 +273,8 @@ func (q *commandQueue) flush(graphicsDriver graphicsdriver.Graphics) error {
|
|||||||
|
|
||||||
// FlushCommands flushes the command queue and present the screen if needed.
|
// FlushCommands flushes the command queue and present the screen if needed.
|
||||||
func FlushCommands(graphicsDriver graphicsdriver.Graphics, endFrame bool) error {
|
func FlushCommands(graphicsDriver graphicsdriver.Graphics, endFrame bool) error {
|
||||||
// Resolve unresolved images only when the frame ends.
|
resolveImages()
|
||||||
// Resolving in tests might cause test flakiness on browsers (#2391).
|
return theCommandQueue.Flush(graphicsDriver, endFrame)
|
||||||
// TODO: Investigate why.
|
|
||||||
if endFrame {
|
|
||||||
resolveImages()
|
|
||||||
}
|
|
||||||
|
|
||||||
return theCommandQueue.Flush(graphicsDriver)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// drawTrianglesCommand represents a drawing command to draw an image on another image.
|
// drawTrianglesCommand represents a drawing command to draw an image on another image.
|
||||||
|
Loading…
Reference in New Issue
Block a user