graphics: Remove unneeded calls ReplacePixels

This commit is contained in:
Hajime Hoshi 2016-07-26 12:47:45 +09:00
parent c5f3eaf925
commit eff0ec8e11

View File

@ -53,7 +53,6 @@ func newImageImpl(width, height int, filter Filter, volatile bool) (*imageImpl,
volatile: volatile,
pixels: pixels.NewPixels(img),
}
i.pixels.ReplacePixels(make([]uint8, width*height*4))
runtime.SetFinalizer(i, (*imageImpl).Dispose)
return i, nil
}
@ -104,7 +103,6 @@ func newScreenImageImpl(width, height int) (*imageImpl, error) {
screen: true,
pixels: pixels.NewPixels(img),
}
i.pixels.ReplacePixels(make([]uint8, width*height*4))
runtime.SetFinalizer(i, (*imageImpl).Dispose)
return i, nil
}