From 73565034a9d4e026c3aa33ca67b3c5b7316e366f Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 8 Sep 2024 19:29:41 +0900 Subject: [PATCH] internal/restorable: refactoring --- internal/restorable/image.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/restorable/image.go b/internal/restorable/image.go index e685f7e76..4a277cec8 100644 --- a/internal/restorable/image.go +++ b/internal/restorable/image.go @@ -80,7 +80,7 @@ func (p *Pixels) Dispose() { // drawTrianglesHistoryItem is an item for history of draw-image commands. type drawTrianglesHistoryItem struct { - images [graphics.ShaderSrcImageCount]*Image + srcImages [graphics.ShaderSrcImageCount]*Image vertices []float32 indices []uint32 blend graphicsdriver.Blend @@ -454,7 +454,7 @@ func (i *Image) appendDrawTrianglesHistory(srcs [graphics.ShaderSrcImageCount]*I copy(us, uniforms) item := &drawTrianglesHistoryItem{ - images: srcs, + srcImages: srcs, vertices: vs, indices: is, blend: blend, @@ -593,7 +593,7 @@ func (i *Image) resolveStale(graphicsDriver graphicsdriver.Graphics) error { // dependsOn reports whether the image depends on src. func (i *Image) dependsOn(src *Image) bool { for _, c := range i.drawTrianglesHistory { - for _, img := range c.images { + for _, img := range c.srcImages { if img != src { continue } @@ -617,7 +617,7 @@ func (i *Image) dependsOnShader(shader *Shader) bool { func (i *Image) dependingImages() map[*Image]struct{} { r := map[*Image]struct{}{} for _, c := range i.drawTrianglesHistory { - for _, img := range c.images { + for _, img := range c.srcImages { if img == nil { continue } @@ -671,7 +671,7 @@ func (i *Image) restore(graphicsDriver graphicsdriver.Graphics) error { for _, c := range i.drawTrianglesHistory { var imgs [graphics.ShaderSrcImageCount]*graphicscommand.Image - for i, img := range c.images { + for i, img := range c.srcImages { if img == nil { continue }