From 67ceaf5874fe1983f84a0c8f54e9a3e0937e6063 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Tue, 13 Sep 2022 06:39:29 -0700 Subject: [PATCH] internal/atlas: rename replacePixels -> writePixels --- internal/atlas/image.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/atlas/image.go b/internal/atlas/image.go index e5edee845..aaefdb643 100644 --- a/internal/atlas/image.go +++ b/internal/atlas/image.go @@ -498,12 +498,12 @@ func (i *Image) drawTriangles(srcs [graphics.ShaderImageCount]*Image, vertices [ func (i *Image) WritePixels(pix []byte, x, y, width, height int) { backendsM.Lock() defer backendsM.Unlock() - i.replacePixels(pix, x, y, width, height) + i.writePixels(pix, x, y, width, height) } -func (i *Image) replacePixels(pix []byte, x, y, width, height int) { +func (i *Image) writePixels(pix []byte, x, y, width, height int) { if i.disposed { - panic("atlas: the image must not be disposed at replacePixels") + panic("atlas: the image must not be disposed at writePixels") } if l := 4 * width * height; len(pix) != l { @@ -544,7 +544,7 @@ func (i *Image) replacePixels(pix []byte, x, y, width, height int) { // TODO: Is clearing edges explicitly really needed? const paddingSize = 1 if paddingSize != i.paddingSize() { - panic(fmt.Sprintf("atlas: replacePixels assumes the padding is always 1 but the actual padding was %d", i.paddingSize())) + panic(fmt.Sprintf("atlas: writePixels assumes the padding is always 1 but the actual padding was %d", i.paddingSize())) } rowPixels := 4 * pw for i := 0; i < rowPixels; i++ {