moai/moai-dev — pull request #1007 by halfnelson (2014-10-27 13:21:53+00:00)
Title: Regression in font glyph (imagetexture) invalidation

fixes regression in image texture routines.
To reproduce run hello moai on android. lock screen, unlock screen, fonts are trashed.

doing nothing on onInvalidate caused the glyphs to be trashed when android was suspended/unsuspended,

calling load was causing a texture reload every glyph (leak),

Instead use the invalidateContents method to put the texture in the correct state to load its image into gpu next call (and reuse the texture handle) and leave onInvalidate handling to manage the android suspend/resume

This was working in 1.5-stable