From 27404b7ae3d2302a68fbd0910a4cb43ac2ead62e Mon Sep 17 00:00:00 2001 From: hiroebe <43773305+hiroebe@users.noreply.github.com> Date: Fri, 10 Jan 2020 23:58:22 +0900 Subject: [PATCH] buffered: Fix delayed DrawImage() (#1050) --- internal/buffered/image.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/buffered/image.go b/internal/buffered/image.go index b76b1b4b5..4e356fb44 100644 --- a/internal/buffered/image.go +++ b/internal/buffered/image.go @@ -222,6 +222,8 @@ func (i *Image) DrawImage(src *Image, bounds image.Rectangle, a, b, c, d, tx, ty delayedCommandsM.Lock() if needsToDelayCommands { delayedCommands = append(delayedCommands, func() { + src.resolvePendingPixels(true) + i.resolvePendingPixels(false) i.img.DrawImage(src.img, bounds, g, colorm, mode, filter) }) delayedCommandsM.Unlock() @@ -242,6 +244,8 @@ func (i *Image) DrawTriangles(src *Image, vertices []float32, indices []uint16, delayedCommandsM.Lock() if needsToDelayCommands { delayedCommands = append(delayedCommands, func() { + src.resolvePendingPixels(true) + i.resolvePendingPixels(false) i.img.DrawTriangles(src.img, vertices, indices, colorm, mode, filter, address) }) delayedCommandsM.Unlock()