summaryrefslogtreecommitdiffstats
path: root/libs/hwui/font
Commit message (Collapse)AuthorAgeFilesLines
* Remove all usage of fmin and fmaxChris Craik2015-07-071-1/+1
| | | | | | | | bug:22208220 Removes needless call, and upconversion to doubles in multiple places. Change-Id: I1b949fa5f206446ac34de800154c0147d6bd8034
* Saturate alpha values when overlaying glyphsChris Craik2015-06-301-7/+7
| | | | | | | | | | bug:19062769 Glyphs were stored to the output buffer with the assumption of non-overlap, which is incorrect for certain fonts/strings. Instead, blend src into dst, so new glyphs don't clobber existing content. Change-Id: I6e22037500e67d5348ee2a43d939416c23c4d1ea
* Use glops for text renderingChris Craik2015-03-182-59/+59
| | | | Change-Id: I5e155c8baf3149f0ff231ec3c89dbff6bb8eae92
* Glop ColorFilter & VertexBuffer support, initial enableChris Craik2015-02-061-1/+1
| | | | | | | Enables Glop rendering for supported Rects and VertexBuffers Also removes unused Query object Change-Id: Ibe227bc362685a153159f75077664f0947764e06
* Refactor blending and texture gl stateChris Craik2015-01-301-3/+3
| | | | Change-Id: Ia6b3c8b2afd3dfcee7f3ce401d846b789612054a
* Add overrides and switch to nullptr keyword for all filesChris Craik2015-01-052-13/+13
| | | | | | | Adds remaining missing overrides and nullptr usages, missed due to an extreme failure in tool usage. Change-Id: I56abd72975a3999ad13330003c348db40f59aebf
* Add overrides and switch to nullptr keywordChris Craik2014-12-222-4/+4
| | | | | | | | 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-9/+5
| | | | | | | | Reverted as hwui doesn't agree. This reverts commit 8a902d9f24e83c87b054adb5836b4a5b8a257be9. Change-Id: I109e7b02bee2921e2155ded6df36f52e6f574b5a
* resolved conflicts for merge of 220c3f4f to masterAndreas Gampe2014-11-211-5/+9
|\ | | | | | | Change-Id: I37ecce8fddecdff82b0eace16f1ee75152f7171e
| * resolved conflicts for merge of 99377df1 to lmp-mr1-dev-plus-aospAndreas Gampe2014-11-211-5/+9
| |\ | | | | | | | | | Change-Id: I3a98f55832ac447b1ed0dd129c7a93d088025943
| | * Frameworks/base: Unused parameters in hwuiAndreas Gampe2014-11-211-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | resolve merge conflicts of f2235b6 to master.Chris Craik2014-11-201-1/+1
|\ \ \ | |/ / | | | | | | Change-Id: Ibcef3a37ca0749931d509b53bd52e53a7d30ddbb
| * | resolve merge conflicts of 57b641a to lmp-mr1-dev-plus-aosp.Chris Craik2014-11-201-1/+1
| |\ \ | | |/ | |/| | | | Change-Id: I1be708f5a0cd4d64021a57f1063d54330f1d2d7e
| | * Improve logging around performance critical eventsChris Craik2014-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bug:17702227 Add details useful to developers (such as layer size/View name), and switch away from logging implementation names/details, since they are generally not relevant to developers. Change-Id: Iee605d182f241450f7e75a6d0c283d51fa1312f5
| * | Frameworks/base: Wall Werror in libs/hwuiAndreas Gampe2014-11-102-7/+8
| |/ | | | | | | | | | | Turn on -Wall -Werror in libs/hwui. Fix errors. Change-Id: I74962d08c889712dacbd0d86d6760fc10802b6bd
* | resolved conflicts for merge of 1d03b816 to lmp-mr1-dev-plus-aospAndreas Gampe2014-11-102-7/+8
| | | | | | | | | | | | (cherry picked from commit 1272887050a269d6d506b42099c2857847ad100b) Change-Id: Ib673768fe5fc03615626ef4b10590e5317f22172
* | Remove error caseDerek Sollenberger2014-10-201-1/+0
| | | | | | | | | | bug: 18051326 Change-Id: I4f2f4abf80b89e540a91251ce55cd65375f6ca65
* | Add back include that ensures RENDER_TEXT_AS_GLYPHS is set consistently.Derek Sollenberger2014-10-201-0/+3
| | | | | | | | | | bug: 18051326 Change-Id: I1ee9f8acb25fb1684e156c61e2cf2669d15a99cb
* | Merge "Clean up physical coupling"Tom Hudson2014-10-165-6/+6
|\ \
| * | Clean up physical couplingTom Hudson2014-10-155-6/+6
| |/ | | | | | | | | | | | | | | Narrow the use of #include directives in hwui, replacing with forward declarations where straightforward. Speeds compiles; doesn't do any restructuring of code. Change-Id: Icac2baffb5896f55d8c6718e9bd9d4bfa02d3ca0
* | Change in Skia APIs require update to HWUI font implementationDerek Sollenberger2014-10-152-7/+6
|/ | | | Change-Id: Ib89a27381f740499e26706716f39ad62fa10778c
* Fix glyph positions underflow issueChris Craik2014-08-151-9/+12
| | | | | | | | bug:16450675 Avoid using unsigned ints in math with negative numbers Change-Id: Icdfb72451f03380dbf78b3703793869b2cd4e751
* Add hack for custom re-rasterization bucketsChris Craik2014-07-072-7/+7
| | | | | | | | | | bug:14083128 Moves all of the font transform management into OpenGLRenderer::findBestFontTransform(), and now simply passes down final rasterization transforms into the FontRenderer. Change-Id: Ie02752e6af863347b142367c7d628db5f9fc2998
* am 3c769ec0: am 00fabcbe: am b1708e9b: Merge "Use alpha channel instead of ↵Chris Craik2014-05-191-1/+2
|\ | | | | | | | | | | | | red in drawCachedGlyphBitmap" * commit '3c769ec02b8b82bec4dec2169bf76af58be94a9a': Use alpha channel instead of red in drawCachedGlyphBitmap
| * am 00fabcbe: am b1708e9b: Merge "Use alpha channel instead of red in ↵Chris Craik2014-05-191-1/+2
| |\ | | | | | | | | | | | | | | | | | | drawCachedGlyphBitmap" * commit '00fabcbeb035fb513293ea01d245002f40b3234f': Use alpha channel instead of red in drawCachedGlyphBitmap
| | * am b1708e9b: Merge "Use alpha channel instead of red in drawCachedGlyphBitmap"Chris Craik2014-05-191-1/+2
| | |\ | | | | | | | | | | | | | | | | * commit 'b1708e9b764268a06d91219a5c39ee9efd32ab00': Use alpha channel instead of red in drawCachedGlyphBitmap
| | | * Use alpha channel instead of red in drawCachedGlyphBitmapDigish Pandya2014-05-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | am 90eaf92e: am 7e13d1d4: am f6c9c420: Merge "Correct stride for drawing to ↵Chris Craik2014-05-091-5/+15
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | cached glyph bitmap" * commit '90eaf92e325457ccb30286879a2f92b7ba517c7d': Correct stride for drawing to cached glyph bitmap
| * | | am 7e13d1d4: am f6c9c420: Merge "Correct stride for drawing to cached glyph ↵Chris Craik2014-05-091-5/+15
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | bitmap" * commit '7e13d1d4a46a01ebaa412d622ef76d90bd39d12a': Correct stride for drawing to cached glyph bitmap
| | * | am f6c9c420: Merge "Correct stride for drawing to cached glyph bitmap"Chris Craik2014-05-091-5/+15
| | |\ \ | | | |/ | | | | | | | | | | | | * commit 'f6c9c4204c2f8f86277d081112c9dd863ddaa778': Correct stride for drawing to cached glyph bitmap
| | | * Correct stride for drawing to cached glyph bitmapDigish Pandya2014-05-091-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes the glyph cachebuffer index to account for pixelbuffer format size. issue: in launcher home screen create icon group and rename the group to some text string with emo-icons (smilies). without this change the drop shadows for emo-icons will look bad. Change-Id: I525a9219d35f4541363fd64e7fc5fd1053269725 Signed-off-by: Digish Pandya <digishp@codeaurora.org>
| | * | Merge "resolved conflicts for merge of 8d3281f5 to klp-dev-plus-aosp" into ↵Leon Scroggins III2014-03-073-12/+15
| | |\ \ | | | |/ | | |/| | | | | klp-dev-plus-aosp
| | | * Update framework to use M33 Skia. DO NOT MERGELeon Scroggins III2014-03-063-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (These CLs are already in master.) Bug: 13246311 This cherry-picks 7 CLs: ----------------------------------------------------------------------- Remove calls to deprecated SkBitmap::setIsOpaque() setIsOpaque() has been removed from ToT Skia. Update setters for mIsPremultiplied and hasAlpha to take the other into consideration. cherry-pick from: I1b36b0b0ce7126031eb7b769b563c17dcd4b306a ----------------------------------------------------------------------- Merge AssetStream with AssetStreamAdaptor. Add enums to the constructor for AssetStreamAdaptor to choose the different behaviors used by the (former) two different classes. The old clients of AssetStream now get the following features of AssetStreamAdaptor - Debugging statements on error. - The stream is an SkStreamRewindable. - getLength() returns the correct value, and the old way of getting the length (read(NULL, 0)) is no longer implemented, since it is no longer used. - isAtEnd() returns the correct value. ToT Skia makes it pure virtual, so some implementation is necessary. cherry-pick from: I2a5395914e4f53830aaefee396556459083a1c56 ----------------------------------------------------------------------- Deprecate Android-specific SkPaint functions. The following functions were problematic: const SkGlyph& getUnicharMetrics(SkUnichar, const SkMatrix*); const SkGlyph& getGlyphMetrics(uint16_t, const SkMatrix*); const void* findImage(const SkGlyph&, const SkMatrix*); Replacing them with calls through SkGlyphCache solved a nasty crash bug, so they have all been deprecated. Bug: 11968757 cherry-pick from: Id746315d41aec5b211b78b172a883c2061130f08 ----------------------------------------------------------------------- pass SkGlyphCache into updateGlyphCache() Doing so prevents us from double-locking the glyph cache, thereby effectively locking ourselves out of reusing work that we'd just done. Bug: 11968757 cherry-pick from: I5c552f2d0bbe30af2ce9054ba684e7da756a0d89 ----------------------------------------------------------------------- Updates to the Skia API needed to merge the WebView m33 version of Skia. cherry-pick from: I0f63b53f2aae58871413b132742fc84138f069a3 Bugfix for screenshots (recent apps) due to incorrect rowBytes computation bug: 12915192 cherry-pick from: I4d5fe2a2f75baf66099e0970fb646686a1992714 ----------------------------------------------------------------------- Fix bug in AndroidPixelRef where we did not store the correct imageInfo for a recycled bitmap. cherry-pick from: I882483b78886e2f19fa4e43a86e69f5a82b3b7e5 ----------------------------------------------------------------------- Change-Id: Ie2b731a9f0795802418cfecddb4b684c92c64d33
| * | | am df64ac68: ask skia to use flat gamma when rendering fonts from hwuiVictoria Lease2014-04-222-2/+6
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * commit 'df64ac688d400c74438db091952d236fffd5f778': ask skia to use flat gamma when rendering fonts from hwui
| | * | | ask skia to use flat gamma when rendering fonts from hwuiVictoria Lease2014-04-222-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 13748392 Change-Id: I6930629b8e900628f15354f663b86dfb29a4db78 (cherry picked from commit b66270eac288de53207e55d10879b070a0ec8b6b)
| * | | | am f8d8777d: Update framework to use M33 Skia. DO NOT MERGELeon Scroggins III2014-03-173-12/+15
| |\ \ \ \ | | |/ / / | | | / / | | |/ / | |/| | * commit 'f8d8777dddf91c741981b4f795f2fb2b1d81c1b6': Update framework to use M33 Skia. DO NOT MERGE
| | * | Update framework to use M33 Skia. DO NOT MERGELeon Scroggins III2014-03-173-12/+15
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (These CLs are already in master.) Bug: 13246311 This cherry-picks 7 CLs: ----------------------------------------------------------------------- Remove calls to deprecated SkBitmap::setIsOpaque() setIsOpaque() has been removed from ToT Skia. Update setters for mIsPremultiplied and hasAlpha to take the other into consideration. cherry-pick from: I1b36b0b0ce7126031eb7b769b563c17dcd4b306a ----------------------------------------------------------------------- Merge AssetStream with AssetStreamAdaptor. Add enums to the constructor for AssetStreamAdaptor to choose the different behaviors used by the (former) two different classes. The old clients of AssetStream now get the following features of AssetStreamAdaptor - Debugging statements on error. - The stream is an SkStreamRewindable. - getLength() returns the correct value, and the old way of getting the length (read(NULL, 0)) is no longer implemented, since it is no longer used. - isAtEnd() returns the correct value. ToT Skia makes it pure virtual, so some implementation is necessary. cherry-pick from: I2a5395914e4f53830aaefee396556459083a1c56 ----------------------------------------------------------------------- Deprecate Android-specific SkPaint functions. The following functions were problematic: const SkGlyph& getUnicharMetrics(SkUnichar, const SkMatrix*); const SkGlyph& getGlyphMetrics(uint16_t, const SkMatrix*); const void* findImage(const SkGlyph&, const SkMatrix*); Replacing them with calls through SkGlyphCache solved a nasty crash bug, so they have all been deprecated. Bug: 11968757 cherry-pick from: Id746315d41aec5b211b78b172a883c2061130f08 ----------------------------------------------------------------------- pass SkGlyphCache into updateGlyphCache() Doing so prevents us from double-locking the glyph cache, thereby effectively locking ourselves out of reusing work that we'd just done. Bug: 11968757 cherry-pick from: I5c552f2d0bbe30af2ce9054ba684e7da756a0d89 ----------------------------------------------------------------------- Updates to the Skia API needed to merge the WebView m33 version of Skia. cherry-pick from: I0f63b53f2aae58871413b132742fc84138f069a3 Bugfix for screenshots (recent apps) due to incorrect rowBytes computation bug: 12915192 cherry-pick from: I4d5fe2a2f75baf66099e0970fb646686a1992714 ----------------------------------------------------------------------- Fix bug in AndroidPixelRef where we did not store the correct imageInfo for a recycled bitmap. cherry-pick from: I882483b78886e2f19fa4e43a86e69f5a82b3b7e5 ----------------------------------------------------------------------- Change-Id: Ie2b731a9f0795802418cfecddb4b684c92c64d33 Conflicts: core/jni/android/graphics/Bitmap.cpp core/jni/android/graphics/Graphics.cpp core/jni/android/graphics/Typeface.cpp graphics/java/android/graphics/Bitmap.java
* | | ask skia to use flat gamma when rendering fonts from hwuiVictoria Lease2014-04-222-2/+6
| | | | | | | | | | | | | | | Bug: 13748392 Change-Id: I6930629b8e900628f15354f663b86dfb29a4db78
* | | am 2c764b20: am 0ec3ca6e: am 449273e2: Merge "Fix for positioning of glyphs ↵Chris Craik2014-02-051-3/+3
|\ \ \ | |/ / | | | | | | | | | | | | | | | within a bitmap" * commit '2c764b20e4a35c509f49e3d9430e135b4f3a0984': Fix for positioning of glyphs within a bitmap
| * | Fix for positioning of glyphs within a bitmapAlexander Toresson2014-01-231-3/+3
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For positioning of glyphs within a bitmap, roundf(int + float) is used, where the float is the glyph position and the int is the text position. When the text position is varied, this may lead to the sum being rounded in different directions, due to floating point rounding, caused by that floating point numbers have different precision in different ranges. This may therefore lead to slightly different positioning for glyphs and therefore slightly different widths and heights for text strings, depending on the position they are rendered at. The solution in this patch is to use int + (int) roundf(float), which has consistent rounding, and also enables us to use the full range of ints. Change-Id: Id1143cdfcbdfa9915ced878ae04df589a3e03cee
* | Use const where possible for drawing parametersChris Craik2014-01-032-20/+21
| | | | | | | | | | | | They should never be modified by a Renderer, only read and copied. Change-Id: I9d8d55dca19115ee9dfeb2bb3f092ba2fb327cd4
* | pass SkGlyphCache into updateGlyphCache()Victoria Lease2013-12-172-8/+8
| | | | | | | | | | | | | | | | Doing so prevents us from double-locking the glyph cache, thereby effectively locking ourselves out of reusing work that we'd just done. Bug: 11968757 Change-Id: I5c552f2d0bbe30af2ce9054ba684e7da756a0d89
* | Deprecate Android-specific SkPaint functions.Victoria Lease2013-12-032-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | The following functions were problematic: const SkGlyph& getUnicharMetrics(SkUnichar, const SkMatrix*); const SkGlyph& getGlyphMetrics(uint16_t, const SkMatrix*); const void* findImage(const SkGlyph&, const SkMatrix*); Replacing them with calls through SkGlyphCache solved a nasty crash bug, so they have all been deprecated. Bug: 11968757 Change-Id: Id746315d41aec5b211b78b172a883c2061130f08
* | Clean unused parameters, disable warningsChris Craik2013-10-172-3/+3
|/ | | | Change-Id: Iddb872f53075dd022eeef45265594d1c6a9e2bc0
* Take SkBitmap's stride into account when uploading texturesRomain Guy2013-09-252-6/+6
| | | | | Bug #10151807 Change-Id: I7ba4804fa3619088fea70eb55f10519fff0bf5f0
* fix kBW_Format glyphsVictoria Lease2013-08-121-2/+4
| | | | | | | | Oops! kBW_Format was omitted from a couple of switch statements, resulting in glyphs in that format being invisible. Bug: 10206452 Change-Id: Ib2aa52250aeeecc0de1b1b78e3d0f568f368c73e
* Support RGBA fonts and bitmap fonts (and RGBA bitmap fonts)Victoria Lease2013-07-313-9/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Share Caches' index buffer with FontRendererRomain Guy2013-06-181-1/+1
| | | | | | | | | 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
* Take hinting into account when caching fontsRomain Guy2013-06-182-0/+6
| | | | | | Bug #9464403 Change-Id: I26a5f0c17eb27d096717b444d3e18ad1d2b5a43c
* Assume a texture is unbound after deleting itRomain Guy2013-06-061-1/+1
| | | | | | | | | | | Bug #9316260 The GL specification indicates that deleting a bound texture has the side effect of binding the default texture (name=0). This change replaces all calls to glDeleteTextures() by Caches::deleteTexture() to properly keep track of texture bindings. Change-Id: Ifbc60ef433e0f9776a668dd5bd5f0adbc65a77a0