mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
mipmap: Refactoring: Do not use mipmap when the image is volatile
This commit is contained in:
parent
04b26adf3d
commit
275dd438fa
@ -298,6 +298,9 @@ func (m *Mipmap) mipmapLevel(geom GeoM, width, height int, filter driver.Filter)
|
||||
if filter == driver.FilterScreen {
|
||||
return 0
|
||||
}
|
||||
if m.volatile {
|
||||
return 0
|
||||
}
|
||||
|
||||
// Use 'negative' mipmap to render edges correctly (#611, #907).
|
||||
// It looks like 128 is the enlargement factor that causes edge missings to pass the test TestImageStretch.
|
||||
@ -341,9 +344,6 @@ func (m *Mipmap) mipmapLevel(geom GeoM, width, height int, filter driver.Filter)
|
||||
if filter != driver.FilterLinear {
|
||||
return 0
|
||||
}
|
||||
if m.volatile {
|
||||
return 0
|
||||
}
|
||||
|
||||
// This is a separate function for testing.
|
||||
level := MipmapLevelForDownscale(det)
|
||||
|
Loading…
Reference in New Issue
Block a user