mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-27 03:02:49 +01:00
buffered: Better comment
This commit is contained in:
parent
b9907c03fa
commit
f3dddaf324
@ -218,8 +218,9 @@ func (i *Image) ReplacePixels(pix []byte, x, y, width, height int) error {
|
|||||||
if x == 0 && y == 0 && width == i.width && height == i.height {
|
if x == 0 && y == 0 && width == i.width && height == i.height {
|
||||||
i.invalidatePendingPixels()
|
i.invalidatePendingPixels()
|
||||||
|
|
||||||
// Call ReplacePixels immediately. If a lot of new images are created but they are used at different
|
// Call ReplacePixels immediately. Do not buffer the command.
|
||||||
// timings, pixels are sent to GPU at different timings, which is very inefficient.
|
// If a lot of new images are created but they are used at different timings,
|
||||||
|
// pixels are sent to GPU at different timings, which is very inefficient.
|
||||||
i.img.ReplacePixels(pix)
|
i.img.ReplacePixels(pix)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user