8 Commits

Author SHA1 Message Date
Romain Guy
d392b87e3d Merge changes Ib0a0b7d1,Ibec4b2aa into jb-mr1-dev
* changes:
  Fix overdraw debug on QCOM
  Make sure we never bind to texture #0 Bug #7195815
2012-09-23 15:00:46 -07:00
Romain Guy
574cf6070d Make sure we never bind to texture #0
Bug #7195815

Change-Id: Ibec4b2aa4c580419eb5eb61adae6c9c960694d0c
2012-09-23 14:45:31 -07:00
Chet Haase
b92d8f7979 Optimize glyph cache texture uploads
Only upload the changed area of the glyph cache, not the entire
bitmap. Note that we can't do the full-on optimization here of copying a sub-rect
of the bitmap because of GL ES 2 limitations, but we can at least copy the
horizontal stripe containing the dirty rect, which can still be a big
savings over uploading the entire bitmap.

Issue #7158326 Bad framerates on MR1 (Mako, Manta, Prime)

Change-Id: Iab38d53202650f757ead4658cf4287bdad2b3cb9
2012-09-23 12:16:02 -07:00
Romain Guy
521dc51fd4 Don't invalidate all the glyphs when flushing large textures
FontRenderer::flushLargeCaches identifies the large textures used to
cache glyphs and visits all the known fonts to mark their glyphs
invalid if they belong to one of these large textures.

Unfortunately, Font::invalidateTextureCache had a logic error
which would make it mark *all glyphs* as invalid, not matter
what texture they belong to. This means that any large cache
flush would cause all glyphs to be invalidate, thus forcing
the rendering system to recreate them on the next draw.

Font::invalidateTextureCache is supposed to behave this way:
- If the specified cacheTexture is NULL (default value), mark
all glyphs as invalid (see FontRenderer::flushAllAndInvalidate())
- If cacheTexture is *not* NULL, invalidate only the glyphs for
which glyph.cacheTexture == cacheTexture.

The previous condition read:

if (cacheTexture || glyph.cacheTexture == cacheTexture)

This test *always* passes.

Change-Id: I418886cb594c81c6178d0f9e9953d975e991cf22
2012-09-04 19:20:06 -07:00
Romain Guy
e43f785b7f Correctly check the height of a glyph prior to caching it
Change-Id: Iaf3977afc20fcde65bfda7b9e092b3e723241684
2012-09-04 18:58:46 -07:00
Romain Guy
8087246d99 Code cleanup in FontRenderer
Change-Id: Ic788721c224a77f0a76f4cd6d9817b62e390a5a7
2012-09-04 16:44:17 -07:00
Romain Guy
9b1204baf4 Small code cleanup in FontRenderer
Change-Id: I09c00debe9b0b4f45b232cae402ed19bdaeabfe4
2012-09-04 15:25:30 -07:00
Romain Guy
9f5dab3fc2 Refactor FontRenderer.cpp
FontRenderer.h defined several classes and structures that now live
in the font/ folder. This will make the code easier to read and
maintain.

Change-Id: I3dc044e9bde1d6515f8704f5c72462877d279fe2
2012-09-04 12:55:44 -07:00