History log of /frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/GlyphCacheActivity.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e816baea651476aca4407200d4a5e629b9ab8dfa 09-Aug-2012 Chet Haase <chet@google.com> Optimize interactions with glyph cache

There are two fixes here:
- precaching: instead of caching-then-drawing whenever there is a new
glyph, we cache at DisplayList record time. Then when we finally draw that
DisplayList, we just upload the affected texture(s) once, instead of once
per change. This is a huge savings in upload time, especially when there are
larger glyphs being used by the app.
- packing: Previously, glyphs would line up horizontally on each cache line, leaving
potentially tons of space vertically, especially when smaller glyphs got put into cache
lines intended for large glyphs (which can happen when an app uses lots of unique
glyphs, a common case with, for example, chinese/japanese/korean languages). The new
approach packs glyphs vertically as well as horizontally to use the space more efficiently
and provide space for more glyphs in these situations.

Change-Id: I84338aa25db208c7bf13f3f92b4d05ed40c33527
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/GlyphCacheActivity.java