mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
grahics: Add comments
This commit is contained in:
parent
40427b6263
commit
2e0b7da614
@ -229,11 +229,13 @@ func (i *imageImpl) resetPixelsIfNeeded(target *imageImpl, context *opengl.Conte
|
||||
if i.pixels == nil {
|
||||
return nil
|
||||
}
|
||||
// target is an image begin tried to mutate.
|
||||
// If pixels object is related to that image, the pixels must be reset.
|
||||
if !i.pixels.NeedsReset(target.image) {
|
||||
return nil
|
||||
}
|
||||
if context == nil {
|
||||
// context is null when this is not initialized yet.
|
||||
// context is nil when this is not initialized yet.
|
||||
i.pixels = nil
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user