summaryrefslogtreecommitdiffstats
path: root/libs/hwui/GammaFontRenderer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Refactoring of Program ownership/lifecycle, and WIP Glop rendering pathChris Craik2015-02-021-7/+8
| | | | Change-Id: I2549032790bddbc048b0bccc224ed8f386b4517c
* Add overrides and switch to nullptr keyword for all filesChris Craik2015-01-051-7/+7
| | | | | | | Adds remaining missing overrides and nullptr usages, missed due to an extreme failure in tool usage. Change-Id: I56abd72975a3999ad13330003c348db40f59aebf
* Cleanup various clang warnings, use unique_ptrs in several placesChris Craik2014-12-231-16/+6
| | | | Change-Id: I347904b25e51fcc7de14b1e72f1acd0f6ba26f3f
* Introduce PixelBuffer API to enable PBOsRomain Guy2013-04-111-0/+20
| | | | | | | | | | | | | | | | | | | | | | | 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
* Tweak text gamma correctionRomain Guy2012-07-181-4/+4
| | | | Change-Id: Icd3326e6a054d6020c3ed61c8459394bc87401dd
* Add a new method for text gamma correctionRomain Guy2012-07-181-21/+43
| | | | | | | | | | | | | | | | | | | To select the gamma correction method, adb shell setprop hwui.text_gamma_correction with one of the following values: lookup3 lookup shader3 shader See Properties.h for more information about these different methods. You can also control gamma correction using the following properties: hwui.text_gamma hwui.text_gamma.black_threshold hwui.text_gamma.white_threshold Change-Id: I47970b804d2c590c37d3da5008db094241579e25
* Add shader-based text gamma correctionRomain Guy2012-07-161-7/+42
| | | | | | | | To enable it, the system property ro.hwui.text_gamma_shader must be set to true. For testing, DEBUG_FONT_RENDERER_FORCE_SHADER_GAMMA can be set to 1 in libhwui/Debug.h. Change-Id: If345c6b71b67ecf1ef2e8847b71f30f3ef251a27
* Refactor GammaFontRendererRomain Guy2012-07-131-12/+41
| | | | | | | This change is the first step to a shader-based text antialias gamma correction. Change-Id: I9eb02d4c56cb95d05219f712290c865b46141954
* De-allocate caches for large glyphs when trimming memoryChet Haase2011-12-161-0/+7
| | | | | | | | | | | | | Currently, font renderers eliminate some texture caches when memory is trimmed. This change makes it go further by eliminating the large-glyph caches for all font renderers. These caches are only allocated as needed, but continue to consume large amounts of memory (CPU and GPU) after that allocation. De-allocating this memory on a trim operation should prevent background apps from holding onto this memory in the possible case that they have allocated it by drawing large glyphs. Change-Id: Id7a3ab49b244e036b442d87252fb40aeca8fdb26
* Memory optimizations for libhwuiRomain Guy2011-11-041-10/+53
| | | | | | | | | | | Bug #5566149 Lazily initialize font renderers Keep 60% of the texture cache when an app goes to the background Delete least used font renderer when going to the background Delete all font renderers on full memory trim Change-Id: I3c2454d46dc1107ec0f0f72a9ce69cbbcc8825e7
* Log only 1 line per process when using OpenGLRenderer.Romain Guy2011-01-211-7/+8
| | | | Change-Id: Idbdd6b84f31301e58ed53e0d50fd61fece192dfa
* Apply gamma correction to font rendering.Romain Guy2010-08-271-0/+103
Change-Id: I1b05f40e356221b2a5eb9400e67d77ecd98ed6c4