restorable: Fix comments (#793)

This commit is contained in:
Hajime Hoshi 2019-01-22 23:33:56 +09:00
parent 158f4fb3ed
commit 2b0dff197e

View File

@ -662,14 +662,14 @@ func TestReadPixelsFromVolatileImage(t *testing.T) {
// First, make sure that dst has pixels // First, make sure that dst has pixels
dst.ReplacePixels(make([]byte, 4*w*h), 0, 0, w, h) dst.ReplacePixels(make([]byte, 4*w*h), 0, 0, w, h)
// Second, draw src to dst. If the implementation is correct, drawImageHistory is created. // Second, draw src to dst. If the implementation is correct, dst becomes stale.
fill(src, 0xff, 0xff, 0xff, 0xff) fill(src, 0xff, 0xff, 0xff, 0xff)
vs := graphics.QuadVertices(w, h, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1) vs := graphics.QuadVertices(w, h, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 1)
is := graphics.QuadIndices() is := graphics.QuadIndices()
dst.DrawImage(src, vs, is, nil, graphics.CompositeModeCopy, graphics.FilterNearest, graphics.AddressClampToZero) dst.DrawImage(src, vs, is, nil, graphics.CompositeModeCopy, graphics.FilterNearest, graphics.AddressClampToZero)
// Read the pixels. If the implementation is correct, dst tries to read its pixels from GPU due to // Read the pixels. If the implementation is correct, dst tries to read its pixels from GPU due to being
// drawImageHistory items. // stale.
want := byte(0xff) want := byte(0xff)
got, _, _, _ := dst.At(0, 0) got, _, _, _ := dst.At(0, 0)
if got != want { if got != want {