graphicsdriver: Remove MaxImageSize

This commit is contained in:
Hajime Hoshi 2018-12-15 03:46:32 +09:00
parent 18d109e3df
commit d29cabca43
3 changed files with 0 additions and 16 deletions

View File

@ -27,17 +27,6 @@ var (
maxImageSize = 0 maxImageSize = 0
) )
// MaxImageSize returns the maximum of width/height of an image.
func MaxImageSize() int {
if maxImageSize == 0 {
maxImageSize = driver().MaxImageSize()
if maxImageSize == 0 {
panic("graphics: failed to get the max texture size")
}
}
return maxImageSize
}
// imageState is a state of an image. // imageState is a state of an image.
type imageState int type imageState int

View File

@ -22,7 +22,6 @@ import (
type GraphicsDriver interface { type GraphicsDriver interface {
SetVertices(vertices []float32, indices []uint16) SetVertices(vertices []float32, indices []uint16)
Flush() Flush()
MaxImageSize() int
NewImage(width, height int) (Image, error) NewImage(width, height int) (Image, error)
NewScreenFramebufferImage(width, height int) (Image, error) NewScreenFramebufferImage(width, height int) (Image, error)
Reset() error Reset() error

View File

@ -105,7 +105,3 @@ func (d *Driver) Draw(indexLen int, indexOffset int, mode graphics.CompositeMode
func (d *Driver) Flush() { func (d *Driver) Flush() {
d.context.flush() d.context.flush()
} }
func (d *Driver) MaxImageSize() int {
return d.context.getMaxTextureSize()
}