Remove imageForPixels

This commit is contained in:
Hajime Hoshi 2016-07-25 02:07:39 +09:00
parent 62acfb5b0a
commit 000958df56

View File

@ -30,14 +30,10 @@ type drawImageHistoryItem struct {
mode opengl.CompositeMode
}
type imageForPixels interface {
Pixels(context *opengl.Context) ([]uint8, error)
}
// basePixels and baseColor are exclusive.
type pixels struct {
image imageForPixels
image *graphics.Image
inconsistent bool
basePixels []uint8
baseColor color.Color
@ -136,6 +132,7 @@ func (p *pixels) flushIfNeeded(target *graphics.Image, context *opengl.Context)
return nil
}
if context == nil {
// context is null when this is not initialized yet.
p.makeInconsistent()
return nil
}