From 2e0b7da614844cf4ec9d55832843f5c0efdb23da Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Tue, 26 Jul 2016 12:17:15 +0900 Subject: [PATCH] grahics: Add comments --- imageimpl.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/imageimpl.go b/imageimpl.go index 0ff46dd81..5f4a2ae87 100644 --- a/imageimpl.go +++ b/imageimpl.go @@ -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 }