restorable: Refactoring: move and rename a const

This commit is contained in:
Hajime Hoshi 2017-07-02 01:41:07 +09:00
parent 6f4f4ed06f
commit 979836d0f5

View File

@ -25,8 +25,6 @@ import (
"github.com/hajimehoshi/ebiten/internal/opengl" "github.com/hajimehoshi/ebiten/internal/opengl"
) )
const drawImageHistoryMax = 100
type drawImageHistoryItem struct { type drawImageHistoryItem struct {
image *Image image *Image
vertices []float32 vertices []float32
@ -159,7 +157,8 @@ func (p *Image) appendDrawImageHistory(image *Image, vertices []float32, colorm
if p.stale { if p.stale {
return return
} }
if len(p.drawImageHistory)+1 > drawImageHistoryMax { const maxDrawImageHistoryNum = 100
if len(p.drawImageHistory)+1 > maxDrawImageHistoryNum {
p.makeStale() p.makeStale()
return return
} }