grahics: Add comments

This commit is contained in:
Hajime Hoshi 2016-07-26 12:17:15 +09:00
parent 40427b6263
commit 2e0b7da614

View File

@ -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
}