mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
internal/restorable: refactoring: remove a redundant FlushCommands call
readPixelsFromGPU already flushes commands.
This commit is contained in:
parent
49e2254e79
commit
b36c21648f
@ -450,9 +450,6 @@ func (i *Image) appendDrawTrianglesHistory(srcs [graphics.ShaderImageCount]*Imag
|
|||||||
|
|
||||||
func (i *Image) readPixelsFromGPUIfNeeded(graphicsDriver graphicsdriver.Graphics) error {
|
func (i *Image) readPixelsFromGPUIfNeeded(graphicsDriver graphicsdriver.Graphics) error {
|
||||||
if len(i.drawTrianglesHistory) > 0 || i.stale {
|
if len(i.drawTrianglesHistory) > 0 || i.stale {
|
||||||
if err := graphicscommand.FlushCommands(graphicsDriver); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if err := i.readPixelsFromGPU(graphicsDriver); err != nil {
|
if err := i.readPixelsFromGPU(graphicsDriver); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user