summaryrefslogtreecommitdiffstats
path: root/libs/hwui/GammaFontRenderer.h
Commit message (Collapse)AuthorAgeFilesLines
* Refactoring of Program ownership/lifecycle, and WIP Glop rendering pathChris Craik2015-02-021-4/+4
| | | | Change-Id: I2549032790bddbc048b0bccc224ed8f386b4517c
* Cleanup various clang warnings, use unique_ptrs in several placesChris Craik2014-12-231-6/+3
| | | | Change-Id: I347904b25e51fcc7de14b1e72f1acd0f6ba26f3f
* Add overrides and switch to nullptr keywordChris Craik2014-12-221-26/+26
| | | | | | | | Changes generated with clang-modernize. Additionally, fixed some struct-vs-class usage to make clang happy. Change-Id: Ic6ef2427401ff1e794d26f21f7b44868fc75fb72
* Revert "resolved conflicts for merge of 220c3f4f to master"Andreas Gampe2014-11-221-8/+8
| | | | | | | | Reverted as hwui doesn't agree. This reverts commit 8a902d9f24e83c87b054adb5836b4a5b8a257be9. Change-Id: I109e7b02bee2921e2155ded6df36f52e6f574b5a
* Frameworks/base: Unused parameters in hwuiAndreas Gampe2014-11-211-8/+8
| | | | | | | | | Remove Clang cutout for unused parameters. Fix warnings. Remove Clang cutout for deprecated Skia function usage. Has been fixed in the L push. Change-Id: I7ea073ff67127cc1e14e798b655e2c50615fe8e7
* Support RGBA fonts and bitmap fonts (and RGBA bitmap fonts)Victoria Lease2013-07-311-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Introduce PixelBuffer API to enable PBOsRomain Guy2013-04-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | | 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
* Bowing my head in shameRomain Guy2012-08-031-0/+1
| | | | | | Bug #6924514 Change-Id: Ifcc08fb5dbaf3f9c6ac3a3e618db2fd6349dc290
* Fix crash with new LookupGammaFontRendererRomain Guy2012-07-201-0/+1
| | | | | | Bug #6853934 Change-Id: I15e6ca73bfe00eff1a37c4b9d2f7f709ee018eb6
* Add a new method for text gamma correctionRomain Guy2012-07-181-4/+52
| | | | | | | | | | | | | | | | | | | 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-1/+13
| | | | | | | | 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-11/+75
| | | | | | | This change is the first step to a shader-based text antialias gamma correction. Change-Id: I9eb02d4c56cb95d05219f712290c865b46141954
* Make glyph cache more flexibleChet Haase2011-12-131-1/+1
| | | | | | | | | | Some GPU architectures could not handle the previous implementation of our glyph cache. Frequent uploads would cause memory problems in the GPU and eventually a crash due to these memory issues. The solution is to move to a system of several, smaller caches instead of one monolythic cache for all glyphs. Change-Id: I0fc7a323360940d16d5a33eeb33abfab194c5920
* Memory optimizations for libhwuiRomain Guy2011-11-041-16/+23
| | | | | | | | | | | 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
* Move all debug flags in a single place.Romain Guy2010-11-101-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | This change also adds a new memory usage flag. When turned on, the following is printed after every frame: D/OpenGLRenderer( 3723): Current memory usage / total memory usage (bytes): D/OpenGLRenderer( 3723): TextureCache 3766680 / 20971520 D/OpenGLRenderer( 3723): LayerCache 3538944 / 8388608 D/OpenGLRenderer( 3723): GradientCache 135168 / 524288 D/OpenGLRenderer( 3723): PathCache 41180 / 4194304 D/OpenGLRenderer( 3723): TextDropShadowCache 0 / 2097152 D/OpenGLRenderer( 3723): FontRenderer 0 262144 / 262144 D/OpenGLRenderer( 3723): FontRenderer 1 262144 / 262144 D/OpenGLRenderer( 3723): FontRenderer 2 262144 / 262144 D/OpenGLRenderer( 3723): Other: D/OpenGLRenderer( 3723): FboCache 2 / 12 D/OpenGLRenderer( 3723): PatchCache 31 / 512 D/OpenGLRenderer( 3723): Total memory usage: D/OpenGLRenderer( 3723): 8268404 bytes, 7.89 MB This should help tracking possibe memory issues. Change-Id: I83f483ca1d2dbef904829bce368e33fe5503e8d6
* Optimize FBO drawing with regions.Romain Guy2010-11-021-3/+3
| | | | | | | | | This optimization is currently disabled until Launcher is modified to take advantage of it. The optimization can be enabled by turning on RENDER_LAYERS_AS_REGIONS in the OpenGLRenderer.h file. Change-Id: I2fdf59d0f4dc690a3d7f712173ab8db3848b27b1
* Apply gamma correction to font rendering.Romain Guy2010-08-271-0/+48
Change-Id: I1b05f40e356221b2a5eb9400e67d77ecd98ed6c4