summaryrefslogtreecommitdiffstats
path: root/libs/hwui/PixelBuffer.h
Commit message (Collapse)AuthorAgeFilesLines
* Move more GL state management to RenderState and its directoryChris Craik2015-01-281-0/+1
| | | | Change-Id: Ic68584e1c08dc64be2ad43450cb6caa1de834fdc
* Use alpha channel instead of red in drawCachedGlyphBitmapDigish Pandya2014-05-151-0/+19
| | | | | | | | | | | the correct value to copy in bitmap is alpha component from the cachebuffer. currently it is offset to red channel if format is RGBA which is wrong. this is followup fix for https://android-review.googlesource.com/#/c/93943/ Change-Id: I96b5ba35df5ccaef44caf2542d35d6585ba1df80 Signed-off-by: Digish Pandya <digishp@codeaurora.org>
* Support RGBA fonts and bitmap fonts (and RGBA bitmap fonts)Victoria Lease2013-07-311-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+180
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