• Home
  • History
  • Annotate
  • only in /frameworks/base/libs/hwui/font/
History log of /frameworks/base/libs/hwui/font/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2c0f93798b2c435307bfb1dfe194a6203e6e6ee5 28-Mar-2016 John Reck <jreck@google.com> Add a font microbench

Also remove a low-signal high-frequency trace mark

Fixes: 27894187

Change-Id: I090122a0db8e455eaa9dbce2b0f5b6778a218188
ont.cpp
c46813d72464f950b6f945f46a979caeaa05d21b 16-Feb-2016 Leon Scroggins III <scroggo@google.com> Clean up some Skia includes

Neither of these files need SkScalerContext.h. Remove those includes.
One really needs SkGlyph.h, so include it instead.

Change-Id: Ic7cfce9e7784c9290c5a2dfdd8385b65d32f9b76
acheTexture.h
ont.h
e8c3c813b0e3ac98304b17a751ce6e436e252bd9 06-Feb-2016 Chris Craik <ccraik@google.com> Fix TextDropShadowCacheTests and glyph_t everywhere

Change-Id: I943eae4e9408c77bdfba6304ba7ee3e862351a41
ont.cpp
ont.h
ontUtil.h
38e0c32852e3b9d8ca4a9d3791577f52536419cb 10-Nov-2015 John Reck <jreck@google.com> Track texture memory globally

Also mostly consolidates texture creation

Change-Id: Ifea01303afda531dcec99b8fe2a0f64cf2f24420
acheTexture.cpp
acheTexture.h
a1717271caac5e8ea3808c331d4141ac01a42134 19-Nov-2015 Chris Craik <ccraik@google.com> Initial text support in new reorderer/renderer

Removes obsolete drawPosText codepath, and unifies text decoration behavior.

Change-Id: I9c563249ab688a3394445a0e7fe1b9d0661f6f7c
ont.cpp
ont.h
0fe8ea20962249c257762c81896758a9f7ecf659 03-Oct-2015 Stephen Hines <srhines@google.com> am 697e3dd6: am ee144b1e: resolved conflicts for bd57dac5 to stage-aosp-master

* commit '697e3dd6b9a8be4451e19ab7c03ced310602b92a':
Don't unregister Fonts from renderer at destruction
ee144b1e60a88e8f097113e046813f0b61c38b9b 03-Oct-2015 Stephen Hines <srhines@google.com> resolved conflicts for bd57dac5 to stage-aosp-master

Change-Id: I5107af13712d7cc908d8699e5c15a002f0a3ec85
148c78f825496b75a812d61e7d9222d897870a6c 02-Oct-2015 Chris Craik <ccraik@google.com> Don't unregister Fonts from renderer at destruction

bug:24584749

Fonts are only destroyed when the renderer is destroyed, this prevents
modifying the FontRenderer's LruCache while it's being iterated through
in FontRenderer::~FontRenderer.

Change-Id: I0e2c9f87981bfa50454ec8689df05851839e288e
ont.cpp
0e9059b4549b6ada1fa6d4db50217b26d104da95 19-Jun-2015 Leon Scroggins III <scroggo@google.com> Change from SkDeviceProperties to SkSurfaceProps.

Fixes build.

Change-Id: Id6b0f96830761f8b6896169327de90f3b390e3c9
(cherry picked from commit 8ebf97a668e7a53bb9810aa5049a8b28435143d2)
ont.cpp
5a4690bf26932c0d6940e4af8516d920e09ae81a 14-Jul-2015 Chris Craik <ccraik@google.com> Clean up unncessary defines

LOG_TAG and TRACE_TAG are already defined in the makefile

Change-Id: I9e53e3dacbe018441edd74cb7c8c90846defee74
ont.cpp
e6a15ee3d0c78eb3f2551d73a7d238c3d8d2f075 08-Jul-2015 Chris Craik <ccraik@google.com> Remove all usage of fmin and fmax

bug:22208220

Removes needless call, and upconversion to doubles in multiple places.

Change-Id: I1b949fa5f206446ac34de800154c0147d6bd8034
acheTexture.cpp
de25a672b18171a3d14315b34dc7c8fcf46ae91e 30-Jun-2015 Chris Craik <ccraik@google.com> Saturate alpha values when overlaying glyphs

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
ont.cpp
e2bb380bc26749782c873e5488cfdf4e42b27346 13-Mar-2015 Chris Craik <ccraik@google.com> Use glops for text rendering

Change-Id: I5e155c8baf3149f0ff231ec3c89dbff6bb8eae92
acheTexture.cpp
acheTexture.h
117bdbcfa3e8306dad21e7e01fa71b00cdfa7265 05-Feb-2015 Chris Craik <ccraik@google.com> Glop ColorFilter & VertexBuffer support, initial enable

Enables Glop rendering for supported Rects and VertexBuffers
Also removes unused Query object

Change-Id: Ibe227bc362685a153159f75077664f0947764e06
acheTexture.cpp
44eb2c00861098dd3e2950d923646814b4cc57c2 29-Jan-2015 Chris Craik <ccraik@google.com> Refactor blending and texture gl state

Change-Id: Ia6b3c8b2afd3dfcee7f3ce401d846b789612054a
acheTexture.cpp
d41c4d8c732095ae99c955b6b82f7306633004b1 06-Jan-2015 Chris Craik <ccraik@google.com> Add overrides and switch to nullptr keyword for all files

Adds remaining missing overrides and nullptr usages, missed due to
an extreme failure in tool usage.

Change-Id: I56abd72975a3999ad13330003c348db40f59aebf
acheTexture.cpp
ont.cpp
e84a208317e0ed388fcdad1e6743c7849acb51b0 22-Dec-2014 Chris Craik <ccraik@google.com> Add overrides and switch to nullptr keyword

Changes generated with clang-modernize.

Additionally, fixed some struct-vs-class usage to make clang happy.

Change-Id: Ic6ef2427401ff1e794d26f21f7b44868fc75fb72
acheTexture.h
ont.h
f088c349dfea985e561d7e838ecd41be5168cd4a 12-Dec-2014 John Reck <jreck@google.com> Fix style

Change-Id: I7227b0eac126bf470ed50249a7809b845872983b
ont.cpp
64bb413a664001c95c8439cf097dc3033f4ed733 22-Nov-2014 Andreas Gampe <agampe@google.com> Revert "resolved conflicts for merge of 220c3f4f to master"

Reverted as hwui doesn't agree.

This reverts commit 8a902d9f24e83c87b054adb5836b4a5b8a257be9.

Change-Id: I109e7b02bee2921e2155ded6df36f52e6f574b5a
ont.cpp
8a902d9f24e83c87b054adb5836b4a5b8a257be9 22-Nov-2014 Andreas Gampe <agampe@google.com> resolved conflicts for merge of 220c3f4f to master

Change-Id: I37ecce8fddecdff82b0eace16f1ee75152f7171e
2ab8298dc37851aab4623ba3f98d71055d653a73 21-Nov-2014 Andreas Gampe <agampe@google.com> resolved conflicts for merge of 99377df1 to lmp-mr1-dev-plus-aosp

Change-Id: I3a98f55832ac447b1ed0dd129c7a93d088025943
42ddc18d108f789705ad4eb697ce9599ad322507 21-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Unused parameters in hwui

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
ont.cpp
06e7fe5a70409d2050b2b3e1286500f5223099da 21-Nov-2014 Chris Craik <ccraik@google.com> resolve merge conflicts of f2235b6 to master.

Change-Id: Ibcef3a37ca0749931d509b53bd52e53a7d30ddbb
f2235b6a48db2e16b52711570bf2a0d0cb0b0d90 21-Nov-2014 Chris Craik <ccraik@google.com> resolve merge conflicts of 57b641a to lmp-mr1-dev-plus-aosp.

Change-Id: I1be708f5a0cd4d64021a57f1063d54330f1d2d7e
70850ea258cbf91477efa57a1f1a23cc0044cc93 18-Nov-2014 Chris Craik <ccraik@google.com> Improve logging around performance critical events

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
ont.cpp
edaecc1db0584fa017822dfc2da0c968b53967e6 11-Nov-2014 Andreas Gampe <agampe@google.com> resolved conflicts for merge of 1d03b816 to lmp-mr1-dev-plus-aosp

(cherry picked from commit 1272887050a269d6d506b42099c2857847ad100b)

Change-Id: Ib673768fe5fc03615626ef4b10590e5317f22172
ont.cpp
ontUtil.h
1e19674107e1aa2224c2b8c7d12bfa057efe80ea 11-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Wall Werror in libs/hwui

Turn on -Wall -Werror in libs/hwui. Fix errors.

Change-Id: I74962d08c889712dacbd0d86d6760fc10802b6bd
ont.cpp
ontUtil.h
1383d1e60f40ec5f21c1e80230c4c058f2849723 20-Oct-2014 Derek Sollenberger <djsollen@google.com> Remove error case

bug: 18051326
Change-Id: I4f2f4abf80b89e540a91251ce55cd65375f6ca65
ontUtil.h
5865172542d5a0b577edd1a32bbb1753d4418362 20-Oct-2014 Derek Sollenberger <djsollen@google.com> Add back include that ensures RENDER_TEXT_AS_GLYPHS is set consistently.

bug: 18051326
Change-Id: I1ee9f8acb25fb1684e156c61e2cf2669d15a99cb
ontUtil.h
07c05e38a1d82181b9e52329e80eea1a4dfccd9a 16-Oct-2014 Tom Hudson <tomhudson@google.com> Merge "Clean up physical coupling"
2dc236b2bae13b9a0ed9b3f7320502aecd7983b3 15-Oct-2014 Tom Hudson <tomhudson@google.com> Clean up physical coupling

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
acheTexture.cpp
acheTexture.h
achedGlyphInfo.h
ont.h
ontUtil.h
413995e0be970a39cc03580e3efb302e17425b4b 13-Oct-2014 Derek Sollenberger <djsollen@google.com> Change in Skia APIs require update to HWUI font implementation

Change-Id: Ib89a27381f740499e26706716f39ad62fa10778c
ont.cpp
ont.h
39c5e7cbdfdc0c74eb5746467d9975dbaba3da61 16-Aug-2014 Chris Craik <ccraik@google.com> Fix glyph positions underflow issue

bug:16450675

Avoid using unsigned ints in math with negative numbers

Change-Id: Icdfb72451f03380dbf78b3703793869b2cd4e751
ont.cpp
59744b79ec302000802cd56d30a1bf70f0183c80 02-Jul-2014 Chris Craik <ccraik@google.com> Add hack for custom re-rasterization buckets

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
ont.cpp
ont.h
50b843883d6906b74ba14ddde285ee8716a23782 19-May-2014 Chris Craik <ccraik@android.com> am 3c769ec0: am 00fabcbe: am b1708e9b: Merge "Use alpha channel instead of red in drawCachedGlyphBitmap"

* commit '3c769ec02b8b82bec4dec2169bf76af58be94a9a':
Use alpha channel instead of red in drawCachedGlyphBitmap
3c769ec02b8b82bec4dec2169bf76af58be94a9a 19-May-2014 Chris Craik <ccraik@android.com> am 00fabcbe: am b1708e9b: Merge "Use alpha channel instead of red in drawCachedGlyphBitmap"

* commit '00fabcbeb035fb513293ea01d245002f40b3234f':
Use alpha channel instead of red in drawCachedGlyphBitmap
00fabcbeb035fb513293ea01d245002f40b3234f 19-May-2014 Chris Craik <ccraik@android.com> am b1708e9b: Merge "Use alpha channel instead of red in drawCachedGlyphBitmap"

* commit 'b1708e9b764268a06d91219a5c39ee9efd32ab00':
Use alpha channel instead of red in drawCachedGlyphBitmap
c62c1cc17ded117433d23ba5dd6c364b05fbcdbd 12-May-2014 Digish Pandya <digishp@codeaurora.org> Use alpha channel instead of red in drawCachedGlyphBitmap

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>
ont.cpp
f9075798d7de2c23f67987d55ac1e4412de8265f 10-May-2014 Chris Craik <ccraik@android.com> am 90eaf92e: am 7e13d1d4: am f6c9c420: Merge "Correct stride for drawing to cached glyph bitmap"

* commit '90eaf92e325457ccb30286879a2f92b7ba517c7d':
Correct stride for drawing to cached glyph bitmap
90eaf92e325457ccb30286879a2f92b7ba517c7d 09-May-2014 Chris Craik <ccraik@android.com> am 7e13d1d4: am f6c9c420: Merge "Correct stride for drawing to cached glyph bitmap"

* commit '7e13d1d4a46a01ebaa412d622ef76d90bd39d12a':
Correct stride for drawing to cached glyph bitmap
7e13d1d4a46a01ebaa412d622ef76d90bd39d12a 09-May-2014 Chris Craik <ccraik@android.com> am f6c9c420: Merge "Correct stride for drawing to cached glyph bitmap"

* commit 'f6c9c4204c2f8f86277d081112c9dd863ddaa778':
Correct stride for drawing to cached glyph bitmap
b9312a54e49f2f0e35bf65f91d796eeb3a6084bc 09-May-2014 Digish Pandya <digishp@codeaurora.org> Correct stride for drawing to cached glyph bitmap

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>
ont.cpp
2c423b22b42269c0652dff4155707cec823fbfc1 23-Apr-2014 Victoria Lease <violets@google.com> am df64ac68: ask skia to use flat gamma when rendering fonts from hwui

* commit 'df64ac688d400c74438db091952d236fffd5f778':
ask skia to use flat gamma when rendering fonts from hwui
df64ac688d400c74438db091952d236fffd5f778 23-Apr-2014 Victoria Lease <violets@google.com> ask skia to use flat gamma when rendering fonts from hwui

Bug: 13748392
Change-Id: I6930629b8e900628f15354f663b86dfb29a4db78
(cherry picked from commit b66270eac288de53207e55d10879b070a0ec8b6b)
ont.cpp
ont.h
b66270eac288de53207e55d10879b070a0ec8b6b 23-Apr-2014 Victoria Lease <violets@google.com> ask skia to use flat gamma when rendering fonts from hwui

Bug: 13748392
Change-Id: I6930629b8e900628f15354f663b86dfb29a4db78
ont.cpp
ont.h
96978ee290ea0ef666c49ffa8733a8c74304c9f1 17-Mar-2014 Leon Scroggins III <scroggo@google.com> am f8d8777d: Update framework to use M33 Skia. DO NOT MERGE

* commit 'f8d8777dddf91c741981b4f795f2fb2b1d81c1b6':
Update framework to use M33 Skia. DO NOT MERGE
f8d8777dddf91c741981b4f795f2fb2b1d81c1b6 03-Dec-2013 Leon Scroggins III <scroggo@google.com> Update framework to use M33 Skia. DO NOT MERGE

(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
ont.cpp
ont.h
ontUtil.h
42ae4cf2ce5ba02c2211813452badc07eab33735 07-Mar-2014 Leon Scroggins III <scroggo@google.com> Merge "resolved conflicts for merge of 8d3281f5 to klp-dev-plus-aosp" into klp-dev-plus-aosp
5e49b497ae2019586937aae0e8159292363728b5 03-Dec-2013 Leon Scroggins III <scroggo@google.com> Update framework to use M33 Skia. DO NOT MERGE

(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
ont.cpp
ont.h
ontUtil.h
ba9a21561e09bddf4ba25fd41474fda6cb941bfb 05-Feb-2014 Chris Craik <ccraik@android.com> am 2c764b20: am 0ec3ca6e: am 449273e2: Merge "Fix for positioning of glyphs within a bitmap"

* commit '2c764b20e4a35c509f49e3d9430e135b4f3a0984':
Fix for positioning of glyphs within a bitmap
3ed192760314dc976cd02f62ac49798daa89b4b1 28-Aug-2013 Alexander Toresson <alexander.toresson@sonymobile.com> Fix for positioning of glyphs within a bitmap

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
ont.cpp
d218a92c0afb8c0d98135b20b52ac87236e1c935 03-Jan-2014 Chris Craik <ccraik@google.com> Use const where possible for drawing parameters

They should never be modified by a Renderer, only read and copied.

Change-Id: I9d8d55dca19115ee9dfeb2bb3f092ba2fb327cd4
ont.cpp
ont.h
2ee2d59b7d10733e7e11e398d2316035d3b36c73 17-Dec-2013 Victoria Lease <violets@google.com> 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
Change-Id: I5c552f2d0bbe30af2ce9054ba684e7da756a0d89
ont.cpp
ont.h
43b692d9a18224e89fc09a0e68d097322e0ef6bb 04-Dec-2013 Victoria Lease <violets@google.com> 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
Change-Id: Id746315d41aec5b211b78b172a883c2061130f08
ont.cpp
ontUtil.h
e63f7c622a2086aefa80983c6f41b74fb166bb42 17-Oct-2013 Chris Craik <ccraik@google.com> Clean unused parameters, disable warnings

Change-Id: Iddb872f53075dd022eeef45265594d1c6a9e2bc0
acheTexture.cpp
acheTexture.h
318ae7bb92869d99a05388c598ad105e7aa4cdbd 25-Sep-2013 Romain Guy <romainguy@google.com> Take SkBitmap's stride into account when uploading textures
Bug #10151807

Change-Id: I7ba4804fa3619088fea70eb55f10519fff0bf5f0
acheTexture.cpp
acheTexture.h
723b2feb929b96b1dde40a865c49ea18bc42f055 12-Aug-2013 Victoria Lease <violets@google.com> fix kBW_Format glyphs

Oops! kBW_Format was omitted from a couple of switch statements,
resulting in glyphs in that format being invisible.

Bug: 10206452
Change-Id: Ib2aa52250aeeecc0de1b1b78e3d0f568f368c73e
acheTexture.cpp
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
acheTexture.cpp
acheTexture.h
ontUtil.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
acheTexture.h
2d5945e88731787babce1061f44cd54f02eeefc5 18-Jun-2013 Romain Guy <romainguy@google.com> Take hinting into account when caching fonts
Bug #9464403

Change-Id: I26a5f0c17eb27d096717b444d3e18ad1d2b5a43c
ont.cpp
ont.h
be1b127c7bec252e0c6ab0e06ed6babed07d496f 06-Jun-2013 Romain Guy <romainguy@google.com> Assume a texture is unbound after deleting it
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
acheTexture.cpp
8aa195d7081b889f3a7b1f426cbd8556377aae5e 05-Jun-2013 Romain Guy <romainguy@google.com> Introduce Caches::bindTexture() to reduce glBindTexture calls

Change-Id: Ic345422567c020c0a9035ff51dcf2ae2a1fc59f4
acheTexture.cpp
acheTexture.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
acheTexture.cpp
acheTexture.h
ont.cpp
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
acheTexture.cpp
acheTexture.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
acheTexture.cpp
acheTexture.h
115096f50a560e64a7f95d37686d4861042c7aeb 19-Mar-2013 Romain Guy <romainguy@google.com> Minimize texture binds when drawing text

When several CacheTextures are used to draw text, sort the
draw batches by texture ID to minimize state changes in the
driver.

This change also tweaks the font cache size and renames
a property that was too long to be set using setprop.

Change-Id: I0a36dfffe58c9e75dd7384592d3343c192d042b1
ontUtil.h
bd3055f95e67a55648fd84a125e939293115171b 14-Mar-2013 Romain Guy <romainguy@google.com> Less aggressive glyphs precaching

The renderer used to pre-cache glyphs at record time. This then changed
to pre-caching at the beginning of every frame. This unfortunately entails
a lot of duplicate work on every frame, which amounts to 0.5 to 1ms in
some stock applications.

This change is somewhere in the middle: pre-caching happens the first
time a DrawTextOp is deferred or every time the screen-space transform
is different from the last pre-caching operation.

Change-Id: Id6d9e2599d90a5b75010b0f0a28746befbf3c205
ont.cpp
8afce816df7e8f668761f7ed443f54238958c49f 07-Mar-2013 Romain Guy <romainguy@google.com> Round scale factors to rasterize text

Harder, better, faster, stronger.

Change-Id: Iee4125de98c4e61603f56bb7f06002cc86458214
ont.cpp
624234f69b2a4781d24f3e4c6ae6450729e38397 06-Mar-2013 Romain Guy <romainguy@google.com> Take only the scale params into account to rasterize text

This change extracts the scale parameters of the current transform
to pass then to the font renderer. Rotation and perspective are
applied to the generated mesh inside the vertex shader. This limits
the number of glyphs we have to create in the font cache and thus
reduces memory churn.

Change-Id: Ic5b3bae2b2b0e0250a8ee723b071a1709725c749
ont.cpp
ont.h
874f5c6e4ac655b4f118074c90d51e6a44abe50c 02-Mar-2013 Romain Guy <romainguy@google.com> Fix math issue when transforming text in perspective

Change-Id: Iad6b4e477c11bd1ef5f0ceab2fabcd440030154d
ont.cpp
ont.h
0f6675332c04c74909425d1d328f02b32c0ff40e 01-Mar-2013 Romain Guy <romainguy@google.com> Precache glyphs at final raster size

The deferred display lists model now allows us to precache glyphs
at their exact size on screen.

This change also removes debug markers when the renderer defers
and reorders display lists. It also adds a flush event marker.

Change-Id: I66ec5216dc12b93ecfdad52a7146b1cfb31fbeb4
ont.cpp
a4adcf0239039eb8f005be252409901c41b28839 28-Feb-2013 Romain Guy <romainguy@google.com> Support 3D rotations when drawing text

If a perspective transform is set on the Canvas, drawText() should
not attempt to rasterize glyphs in screen space. This change uses
the old behavior instead (i.e. rasterize the glyphs at the native
font size and apply the transform on the resulting mesh.)

This change also adds an optimization: empty glyphs (spaces) do
not generate vertices anymore. This saves a lot of vertices in text
heavy applications such as Gmail.

Change-Id: Ib531384163f5165b5785501612a7b1474f3ff599
ont.cpp
ont.h
c74f45a334f0e3725c23cdd270cbcb0efac4ea75 27-Feb-2013 Romain Guy <romainguy@google.com> Properly scale text

This change does not apply to drawPosText() and drawTextOnPath() yet.

Prior to this change, glyphs were always rasterized based on the
font size specified in the paint. All transforms were then applied
on the resulting texture. This creates rather ugly results when
text is scaled and/or rotated.

With this change, the font renderer will apply the current transform
matrix to the glyph before they are rasterized. This generates much
better looking results.

Change-Id: I0141b6ff18db35e1213e7a3ab9db1ecaf03d7a9c
ont.cpp
ont.h
e67307c816f3fdae2bfba8e9a4410dc015645e91 12-Feb-2013 Romain Guy <romainguy@google.com> Prevent crash when setting up a stencil-based clip
Bug #8177690

Clear the layers before we setup the stencil to avoid dereferencing
the recently deleted rects.

Change-Id: I5dce5f965672f276f9490636d85b6018d3ab9422
ont.cpp
23e500d168e8d649305445f6c1d2b49d8d2c00fd 06-Feb-2013 Derek Sollenberger <djsollen@google.com> Merge "Merge remote-tracking branch 'goog/master-chromium' into 'goog/master'"
b969a0de65730b071d846f8302e751e2637e6dbe 05-Feb-2013 Romain Guy <romainguy@google.com> Add support for non-antialiased text

Change-Id: I17c073955ab94abc9b409e5fcfbc675faa07c5ba
ont.cpp
ont.h
14c40b47565778b7185de7655836485f3065877a 09-Jan-2013 Romain Guy <romainguy@google.com> Fix build

Change-Id: Ia465bd844b592fc05e59ad392ecc5ca4d34d24d7
ont.cpp
19d4f1806a953b87435a2bb6fd8e738424e94003 09-Jan-2013 Romain Guy <romainguy@google.com> resolved conflicts for merge of c88c60be to master-chromium

Change-Id: I3b4b42443312068e942aa779dfdc928afa7569fd
e3a9b24b5e3f9b2058486814a6d27729e51ad466 08-Jan-2013 Romain Guy <romainguy@google.com> Add plumbing for better text scaling

Fonts are now described by a transform matrix. This lead to switching
from a vector to a hashmap. This change therefore adds new comparators
and hash computations to Font.

Change-Id: I2daffa7d6287c18554c606b8bfa06640d28b4530
ont.cpp
ont.h
ontUtil.h
ca79cf69d09efa0c327e9b1237d86a119aea5da7 14-Aug-2012 Derek Sollenberger <djsollen@google.com> Update framework to support r5967 of Skia.

bug: 6906025
Change-Id: Iefdb830ec3aa2ab3472c1c142484a7aa21788a15
acheTexture.cpp
ont.cpp
a3dc55f83ab583e0a66b893c71b849afa046770a 28-Sep-2012 Romain Guy <romainguy@google.com> Fix a couple of rendering issues
Bug #7253839

1. Make sure we don't make GL calls while recording display lists

2. Disable an early and trivial clip optimization in font renderer
when a perspective transformation is used on the Canvas

Change-Id: I3f1052164239329346854f72d0a0d401fbfecf06
ont.cpp
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
acheTexture.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
acheTexture.cpp
acheTexture.h
521dc51fd411285f900c083a4fe560d2ed7c3f8a 05-Sep-2012 Romain Guy <romainguy@google.com> Don't invalidate all the glyphs when flushing large textures

FontRenderer::flushLargeCaches identifies the large textures used to
cache glyphs and visits all the known fonts to mark their glyphs
invalid if they belong to one of these large textures.

Unfortunately, Font::invalidateTextureCache had a logic error
which would make it mark *all glyphs* as invalid, not matter
what texture they belong to. This means that any large cache
flush would cause all glyphs to be invalidate, thus forcing
the rendering system to recreate them on the next draw.

Font::invalidateTextureCache is supposed to behave this way:
- If the specified cacheTexture is NULL (default value), mark
all glyphs as invalid (see FontRenderer::flushAllAndInvalidate())
- If cacheTexture is *not* NULL, invalidate only the glyphs for
which glyph.cacheTexture == cacheTexture.

The previous condition read:

if (cacheTexture || glyph.cacheTexture == cacheTexture)

This test *always* passes.

Change-Id: I418886cb594c81c6178d0f9e9953d975e991cf22
ont.cpp
e43f785b7ff3fdf75f6d1c92282ebca6db191f2f 05-Sep-2012 Romain Guy <romainguy@google.com> Correctly check the height of a glyph prior to caching it

Change-Id: Iaf3977afc20fcde65bfda7b9e092b3e723241684
acheTexture.cpp
acheTexture.h
8087246d9964b11de8ce116bc63b156faa4197e0 05-Sep-2012 Romain Guy <romainguy@google.com> Code cleanup in FontRenderer

Change-Id: Ic788721c224a77f0a76f4cd6d9817b62e390a5a7
acheTexture.h
ont.cpp
ont.h
9b1204baf4740b4d443e72157dea98571cf84e1f 05-Sep-2012 Romain Guy <romainguy@google.com> Small code cleanup in FontRenderer

Change-Id: I09c00debe9b0b4f45b232cae402ed19bdaeabfe4
acheTexture.cpp
acheTexture.h
ont.cpp
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
acheTexture.cpp
acheTexture.h
achedGlyphInfo.h
ont.cpp
ont.h
ontUtil.h