mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-23 17:32:02 +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 {
|
if i.pixels == nil {
|
||||||
return 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) {
|
if !i.pixels.NeedsReset(target.image) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if context == 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
|
i.pixels = nil
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user