mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-23 17:32:02 +01:00
Remove imageForPixels
This commit is contained in:
parent
62acfb5b0a
commit
000958df56
@ -30,14 +30,10 @@ type drawImageHistoryItem struct {
|
|||||||
mode opengl.CompositeMode
|
mode opengl.CompositeMode
|
||||||
}
|
}
|
||||||
|
|
||||||
type imageForPixels interface {
|
|
||||||
Pixels(context *opengl.Context) ([]uint8, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
// basePixels and baseColor are exclusive.
|
// basePixels and baseColor are exclusive.
|
||||||
|
|
||||||
type pixels struct {
|
type pixels struct {
|
||||||
image imageForPixels
|
image *graphics.Image
|
||||||
inconsistent bool
|
inconsistent bool
|
||||||
basePixels []uint8
|
basePixels []uint8
|
||||||
baseColor color.Color
|
baseColor color.Color
|
||||||
@ -136,6 +132,7 @@ func (p *pixels) flushIfNeeded(target *graphics.Image, context *opengl.Context)
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if context == nil {
|
if context == nil {
|
||||||
|
// context is null when this is not initialized yet.
|
||||||
p.makeInconsistent()
|
p.makeInconsistent()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user