diff --git a/internal/graphics/image.go b/internal/graphics/image.go index 0ef36bd27..50c6e194e 100644 --- a/internal/graphics/image.go +++ b/internal/graphics/image.go @@ -85,6 +85,7 @@ func (i *Image) Size() (int, int) { } func (i *Image) Fill(clr color.Color) error { + // TODO: Need to clone clr value c := &fillCommand{ dst: i, color: clr, diff --git a/internal/pixels/pixels.go b/internal/pixels/pixels.go index 2c1281d41..6a1c6df2f 100644 --- a/internal/pixels/pixels.go +++ b/internal/pixels/pixels.go @@ -79,6 +79,8 @@ func (p *Pixels) AppendDrawImageHistory(image *graphics.Image, vertices []int16, if p.stale { return } + // All images must be resolved and not stale each after frame. + // So we don't have to care if image is stale or not here. item := &drawImageHistoryItem{ image: image, vertices: vertices, @@ -107,6 +109,7 @@ func (p *Pixels) DependsOn(target *graphics.Image) bool { if p.stale { return false } + // TODO: Performance is bad when drawImageHistory is too many. for _, c := range p.drawImageHistory { if c.image == target { return true