umegaya/moaigui — pull request #1 by makotok (2013-06-21 16:22:54+00:00)
Title: Performance improvement of font generation

Because texture is frequently generated, performance is poor.
The By setting the charcodes in advance, and improved the performance
greatly.

test textbox.lua(demo)

* Before
TEXTURE: '+' 2748 = 0.00MB < /Users/mkinoshita/moai-work/moaigui/resources/gui/vert scroll center.png
TEXTURE: '+' 32768 = 0.03MB < /Users/mkinoshita/moai-work/moaigui/resources/fonts/arial-rounded.TTF
TEXTURE: '+' 340 = 0.03MB < /Users/mkinoshita/moai-work/moaigui/resources/gui/vert scroller.png
TEXTURE: '+' 32768 = 0.07MB < /Users/mkinoshita/moai-work/moaigui/resources/fonts/arial-rounded.TTF
TEXTURE: '+' 32768 = 0.10MB < /Users/mkinoshita/moai-work/moaigui/resources/fonts/arial-rounded.TTF
TEXTURE: '+' 32768 = 0.13MB < /Users/mkinoshita/moai-work/moaigui/resources/fonts/arial-rounded.TTF
TEXTURE: '+' 32768 = 0.16MB < /Users/mkinoshita/moai-work/moaigui/resources/fonts/arial-rounded.TTF
TEXTURE: '+' 32768 = 0.19MB < /Users/mkinoshita/moai-work/moaigui/resources/fonts/arial-rounded.TTF
TEXTURE: '+' 32768 = 0.22MB < /Users/mkinoshita/moai-work/moaigui/resources/fonts/arial-rounded.TTF
TEXTURE: '+' 32768 = 0.25MB < /Users/mkinoshita/moai-work/moaigui/resources/fonts/arial-rounded.TTF
TEXTURE: '+' 32768 = 0.28MB < /Users/mkinoshita/moai-work/moaigui/resources/fonts/arial-rounded.TTF
TEXTURE: '+' 32768 = 0.32MB < /Users/mkinoshita/moai-work/moaigui/resources/fonts/arial-rounded.TTF
TEXTURE: '+' 32768 = 0.35MB < /Users/mkinoshita/moai-work/moaigui/resources/fonts/arial-rounded.TTF

* After
TEXTURE: '+' 2748 = 0.00MB < /Users/mkinoshita/moai-work/moaigui/resources/gui/vert scroll center.png
TEXTURE: '+' 32768 = 0.03MB < /Users/mkinoshita/moai-work/moaigui/resources/fonts/arial-rounded.TTF
TEXTURE: '+' 340 = 0.03MB < /Users/mkinoshita/moai-work/moaigui/resources/gui/vert scroller.png