History log of /frameworks/base/libs/hwui/font/CacheTexture.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
e63f7c622a2086aefa80983c6f41b74fb166bb42 17-Oct-2013 Chris Craik <ccraik@google.com> Clean unused parameters, disable warnings

Change-Id: Iddb872f53075dd022eeef45265594d1c6a9e2bc0
/frameworks/base/libs/hwui/font/CacheTexture.h
318ae7bb92869d99a05388c598ad105e7aa4cdbd 25-Sep-2013 Romain Guy <romainguy@google.com> Take SkBitmap's stride into account when uploading textures
Bug #10151807

Change-Id: I7ba4804fa3619088fea70eb55f10519fff0bf5f0
/frameworks/base/libs/hwui/font/CacheTexture.h
1e546815bbb736c50679a8aefc25f48561026fc5 25-Jun-2013 Victoria Lease <violets@google.com> Support RGBA fonts and bitmap fonts (and RGBA bitmap fonts)

Quite a few things going on in this commit:

- Enable bitmap strikes by default in Paint objects.

The SkPaint parameter that enables bitmap strikes was not previously
included in DEFAULT_PAINT_FLAGS. This effectively disabled bitmap
fonts. Oops! It's for the best, though, as additional work was needed
in Skia to make bitmap fonts work anyway.

- Complain if TEXTURE_BORDER_SIZE is not 1.

Our glyph cache code does not currently handle any value other than 1
here, including zero. I've added a little C preprocessor check to
prevent future engineers (including especially future-me) from
thinking that they can change this value without updating the related
code.

- Add GL_RGBA support to hwui's FontRenderer and friends

This also happened to involve some refactoring for convenience and
cleanliness.

Bug: 9577689
Change-Id: I0abd1e5a0d6623106247fb6421787e2c2f2ea19c
/frameworks/base/libs/hwui/font/CacheTexture.h
31e08e953fe7bdb1b1cbc247156cb6a19917a2f1 19-Jun-2013 Romain Guy <romainguy@google.com> Share Caches' index buffer with FontRenderer

This reduces state changes when we draw 9patches and text together,
which happens *a lot*. Also disable the NV profiling extension by
default since it doesn't play nice with display lists deferrals.
To enable it set debug.hwui.nv_profiling to true.

Change-Id: I518b44b7d294e5def10c78911ceb9f01ae401609
/frameworks/base/libs/hwui/font/CacheTexture.h
8aa195d7081b889f3a7b1f426cbd8556377aae5e 05-Jun-2013 Romain Guy <romainguy@google.com> Introduce Caches::bindTexture() to reduce glBindTexture calls

Change-Id: Ic345422567c020c0a9035ff51dcf2ae2a1fc59f4
/frameworks/base/libs/hwui/font/CacheTexture.h
cf51a4199835e9604aa4c8b3854306f8fbabbf33 09-Apr-2013 Romain Guy <romainguy@google.com> Introduce PixelBuffer API to enable PBOs

PBOs (Pixel Buffer Objects) can be used on OpenGL ES 3.0 to perform
asynchronous texture uploads to free up the CPU. This change does not
enable the use of PBOs unless a specific property is set (Adreno drivers
have issues with PBOs at the moment, Mali drivers work just fine.)

This change also cleans up Font/FontRenderer a little bit and improves
performance of drop shadows generations by using memcpy() instead of
a manual byte-by-byte copy.

On GL ES 2.0 devices, or when PBOs are disabled, a PixelBuffer instance
behaves like a simple byte array. The extra APIs introduced for PBOs
(map/unmap and bind/unbind) are pretty much no-ops for CPU pixel
buffers and won't introduce any significant overhead.

This change also fixes a bug with text drop shadows: if the drop
shadow is larger than the max texture size, the renderer would leave
the GL context in a bad state and generate 0x501 errors. This change
simply skips drop shadows if they are too large.

Change-Id: I2700aadb0c6093431dc5dee3d587d689190c4e23
/frameworks/base/libs/hwui/font/CacheTexture.h
0908764b2b3cf5075df4178a5f0a8547dcb7b317 04-Apr-2013 Romain Guy <romainguy@google.com> First OpenGL ES 3.0 based optimization

This change uses a new OpenGL ES 3.0 feature to upload less data when
the font cache needs to be update. This can result in significant
performance improvements on device with large textures or with locales
that use a lot of glyphs (CJK for instance.)

This change also fixes various unpack alignment issues. The unpack
alignment, as well as the unpack row length, is not texture specific
but a global state that affect all glTex/SubImage2D calls. Some of
them were missing the appropriate glPixelStorei() call. This could
result in corrupted textures.

Change-Id: Iefb429d4d0d0b4e0faeadf27daafee6d30a21d85
/frameworks/base/libs/hwui/font/CacheTexture.h
661a87ec28a49458f1faf533783abf2ab9927cab 19-Mar-2013 Romain Guy <romainguy@google.com> Reduce number of glDraw calls when drawing text

This change moves the mesh buffer from FontRenderer to CacheTexture
to help reduce the number of texture binds and glDraw calls when
drawing text that spans across multiple textures.

Change-Id: I7de574d88313ca3672879ca878c253ff5f131fc1
/frameworks/base/libs/hwui/font/CacheTexture.h
d392b87e3d30cd4f0836623d848019c5724efce8 24-Sep-2012 Romain Guy <romainguy@google.com> Merge changes Ib0a0b7d1,Ibec4b2aa into jb-mr1-dev

* changes:
Fix overdraw debug on QCOM
Make sure we never bind to texture #0 Bug #7195815
574cf6070d34e66dfd6f2006937986eddd1f09e7 23-Sep-2012 Romain Guy <romainguy@google.com> Make sure we never bind to texture #0
Bug #7195815

Change-Id: Ibec4b2aa4c580419eb5eb61adae6c9c960694d0c
/frameworks/base/libs/hwui/font/CacheTexture.h
b92d8f7979c29c7c09932578a11b2f8d6eec1d90 21-Sep-2012 Chet Haase <chet@google.com> 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
/frameworks/base/libs/hwui/font/CacheTexture.h
e43f785b7ff3fdf75f6d1c92282ebca6db191f2f 05-Sep-2012 Romain Guy <romainguy@google.com> Correctly check the height of a glyph prior to caching it

Change-Id: Iaf3977afc20fcde65bfda7b9e092b3e723241684
/frameworks/base/libs/hwui/font/CacheTexture.h
8087246d9964b11de8ce116bc63b156faa4197e0 05-Sep-2012 Romain Guy <romainguy@google.com> Code cleanup in FontRenderer

Change-Id: Ic788721c224a77f0a76f4cd6d9817b62e390a5a7
/frameworks/base/libs/hwui/font/CacheTexture.h
9b1204baf4740b4d443e72157dea98571cf84e1f 05-Sep-2012 Romain Guy <romainguy@google.com> Small code cleanup in FontRenderer

Change-Id: I09c00debe9b0b4f45b232cae402ed19bdaeabfe4
/frameworks/base/libs/hwui/font/CacheTexture.h
9f5dab3fc228fa11c32b483e6101ec086895a32b 04-Sep-2012 Romain Guy <romainguy@google.com> 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
/frameworks/base/libs/hwui/font/CacheTexture.h