graphics: Remove 'filter' argument from newVolatileImage (#503)

This commit is contained in:
Hajime Hoshi 2018-04-06 03:34:14 +09:00
parent 2f7cd00d2c
commit c62e63f874
2 changed files with 3 additions and 3 deletions

View File

@ -54,7 +54,7 @@ func (c *graphicsContext) SetSize(screenWidth, screenHeight int, screenScale flo
if c.offscreen != nil { if c.offscreen != nil {
_ = c.offscreen.Dispose() _ = c.offscreen.Dispose()
} }
c.offscreen = newVolatileImage(screenWidth, screenHeight, FilterDefault) c.offscreen = newVolatileImage(screenWidth, screenHeight)
w := int(float64(screenWidth) * screenScale) w := int(float64(screenWidth) * screenScale)
h := int(float64(screenHeight) * screenScale) h := int(float64(screenHeight) * screenScale)

View File

@ -373,10 +373,10 @@ func NewImage(width, height int, filter Filter) (*Image, error) {
// If width or height is less than 1 or more than device-dependent maximum size, newVolatileImage panics. // If width or height is less than 1 or more than device-dependent maximum size, newVolatileImage panics.
// //
// Error returned by newVolatileImage is always nil as of 1.5.0-alpha. // Error returned by newVolatileImage is always nil as of 1.5.0-alpha.
func newVolatileImage(width, height int, filter Filter) *Image { func newVolatileImage(width, height int) *Image {
i := &Image{ i := &Image{
shareableImage: shareable.NewVolatileImage(width, height), shareableImage: shareable.NewVolatileImage(width, height),
filter: filter, filter: FilterDefault,
} }
i.addr = i i.addr = i
runtime.SetFinalizer(i, (*Image).Dispose) runtime.SetFinalizer(i, (*Image).Dispose)