mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-02-10 01:53:14 +01:00
graphics: Refactoring
This commit is contained in:
parent
4ce850df70
commit
837571d05c
@ -15,7 +15,6 @@
|
|||||||
package ebiten
|
package ebiten
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"image/color"
|
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
"github.com/hajimehoshi/ebiten/internal/clock"
|
"github.com/hajimehoshi/ebiten/internal/clock"
|
||||||
@ -99,7 +98,7 @@ func (c *graphicsContext) Update(afterFrameUpdate func()) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
for i := 0; i < updateCount; i++ {
|
for i := 0; i < updateCount; i++ {
|
||||||
c.offscreen.Fill(color.Transparent)
|
c.offscreen.Clear()
|
||||||
// Mipmap images should be disposed by fill.
|
// Mipmap images should be disposed by fill.
|
||||||
|
|
||||||
setDrawingSkipped(i < updateCount-1)
|
setDrawingSkipped(i < updateCount-1)
|
||||||
@ -112,7 +111,7 @@ func (c *graphicsContext) Update(afterFrameUpdate func()) error {
|
|||||||
afterFrameUpdate()
|
afterFrameUpdate()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Before clearing the screen, the offscreen's pixels must be solved.
|
// Before clearing the screen, the offscreen's pixels must be resolved.
|
||||||
// After clearing the screen, resolving doesn't work. This is very hacky
|
// After clearing the screen, resolving doesn't work. This is very hacky
|
||||||
// but we could not find other way so far (#792).
|
// but we could not find other way so far (#792).
|
||||||
c.offscreen.resolvePixelsToSet(true)
|
c.offscreen.resolvePixelsToSet(true)
|
||||||
|
Loading…
Reference in New Issue
Block a user