mipmap: Remove unused members

This commit is contained in:
Hajime Hoshi 2020-01-08 02:32:28 +09:00
parent 4c8137ccf5
commit 2cbd5aa16e

View File

@ -58,8 +58,6 @@ type levelToImage map[int]*shareable.Image
// Mipmap is a set of shareable.Image sorted by the order of mipmap level. // Mipmap is a set of shareable.Image sorted by the order of mipmap level.
// The level 0 image is a regular image and higher-level images are used for mipmap. // The level 0 image is a regular image and higher-level images are used for mipmap.
type Mipmap struct { type Mipmap struct {
width int
height int
volatile bool volatile bool
orig *shareable.Image orig *shareable.Image
imgs map[image.Rectangle]levelToImage imgs map[image.Rectangle]levelToImage
@ -67,8 +65,6 @@ type Mipmap struct {
func New(width, height int, volatile bool) *Mipmap { func New(width, height int, volatile bool) *Mipmap {
return &Mipmap{ return &Mipmap{
width: width,
height: height,
volatile: volatile, volatile: volatile,
orig: shareable.NewImage(width, height, volatile), orig: shareable.NewImage(width, height, volatile),
imgs: map[image.Rectangle]levelToImage{}, imgs: map[image.Rectangle]levelToImage{},
@ -77,10 +73,8 @@ func New(width, height int, volatile bool) *Mipmap {
func NewScreenFramebufferMipmap(width, height int) *Mipmap { func NewScreenFramebufferMipmap(width, height int) *Mipmap {
return &Mipmap{ return &Mipmap{
width: width, orig: shareable.NewScreenFramebufferImage(width, height),
height: height, imgs: map[image.Rectangle]levelToImage{},
orig: shareable.NewScreenFramebufferImage(width, height),
imgs: map[image.Rectangle]levelToImage{},
} }
} }
@ -261,10 +255,6 @@ func sizeForLevel(origWidth, origHeight int, level int) (width, height int) {
return return
} }
func (m *Mipmap) isDisposed() bool {
return m.orig == nil
}
func (m *Mipmap) MarkDisposed() { func (m *Mipmap) MarkDisposed() {
m.disposeMipmaps() m.disposeMipmaps()
m.orig.MarkDisposed() m.orig.MarkDisposed()