From 42aa5fa604a0832c206d54397f4962f3c4ee0249 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Tue, 28 Feb 2023 08:48:25 -0800 Subject: [PATCH] internal/restorable: bug fix: an extended image has a wrong state (especially with OpenGL ES) --- internal/restorable/image.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/internal/restorable/image.go b/internal/restorable/image.go index a263b586f..eacbb5d94 100644 --- a/internal/restorable/image.go +++ b/internal/restorable/image.go @@ -204,14 +204,6 @@ func (i *Image) Extend(width, height int) *Image { Height: float32(sh), } newImg.DrawTriangles(srcs, offsets, vs, is, graphicsdriver.BlendCopy, dr, graphicsdriver.Region{}, NearestFilterShader, nil, false) - - // Overwrite the history as if the image newImg is created only by WritePixels. - newImg.clearDrawTrianglesHistory() - newImg.basePixels = i.basePixels - newImg.stale = i.stale - newImg.staleRegions = make([]image.Rectangle, len(i.staleRegions)) - copy(newImg.staleRegions, i.staleRegions) - i.Dispose() return newImg