History log of /frameworks/base/core/jni/android/graphics/Paint.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
577b07197b1bf1b3903e0bc0f3d48fabfd927b2a 05-Oct-2012 Raph Levien <raph@google.com> Fix for 7281523 android.text.cts.SelectionTest#testMoveRight failures

The failures were caused by the implementation of doTextRunCursor
passing a too-small value for contextCount into the underlying
getTextRunAdvances call (it wasn't accounting for the start offset).
Thus, when getTextRunAdvances made a copy of the text for its cache key,
it was getting a partial copy.

This patch fixes the size so the cache key always has a full copy of the
text.

Change-Id: I57e3ac6de7aef0e1f1c7000dc3d653f9b0d623d2
/frameworks/base/core/jni/android/graphics/Paint.cpp
c1eff0857ebc6abce48ba8c267ab32109dd45ef0 14-Sep-2012 Raph Levien <raph@google.com> am e5905684: am eceb3171: am f4afc401: Merge "framework: fix bug for uninitialized variable"

* commit 'e590568417aa824e7b0e76ae727556d329cb57cf':
framework: fix bug for uninitialized variable
46e942d500d5ce67a58269cbac3307deca6a5c9f 27-Jul-2012 Zhou Chang <chang.zhou@intel.com> framework: fix bug for uninitialized variable

Some application display error due to uninitialized varibale.
This patch fix the bug

Change-Id: I660169e325ffae60d95c7774aaaeaebf693adf3d
Author: Chang Zhou <chang.zhou@intel.com>
Signed-off-by: Chang Zhou <chang.zhou@intel.com>
Signed-off-by: Chong Xing <chong.xing@intel.com>
Signed-off-by: Hongyu Zhang <hongyu.zhang@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 45356
/frameworks/base/core/jni/android/graphics/Paint.cpp
ac1cbaf2e5575ac75a0160e13089d51a0bb232fa 18-Jul-2012 Billy Hewlett <billyh@google.com> DO NOT MERGE Han Preference

Cherry-pick Ib5dd86950156c5a438f25c289acb839206bb455a from master.

Data: label MTLmr3m with "ja" locale attribute, fallback_fonts-ja.xml removed,
as we only need a single fallback font file
Code: Add locale and variant to TextLayoutCache. Paint.java sets textLocale as
the language (for example, "ja") rather than the language/locale concatenated
(for example "ja_JP")

This checkin, along with Change-Id: Id8c91ae0be6cad8a7ef77a0cd5803676290986c1,
allows text view objects to set their locale dynamically and skia will use the
correct font for the locale.

Change-Id: Ieb60b0d7a39fcfef4f8ce90cd4f6065d33673710
/frameworks/base/core/jni/android/graphics/Paint.cpp
517825f1a9f14f92908bd7859b91b927c2eec6d9 07-Apr-2012 Fabrice Di Meglio <fdimeglio@google.com> Add Paint.setTextLocale()

- will be used for better shaping CJK and other goodies

Change-Id: If64945a337edd915f5ebb88f04b6fd18e92ca587
/frameworks/base/core/jni/android/graphics/Paint.cpp
a731b082b2c43204e6e9f927ab82fb732934a83b 24-Jan-2012 Fabrice Di Meglio <fdimeglio@google.com> Code cleaning: centralize use of #if USE_TEXT_LAYOUT_CACHE

- also clean some destructors (was not quite compulsory because
they are related to some Singletons)

Change-Id: I3091cac7b38628cda593d72570ba7a5d7ea2a15c
/frameworks/base/core/jni/android/graphics/Paint.cpp
bd901dee317d10c6a921922c3d7d788b90306c82 21-Jan-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #5846413 "phone" keyboard layout is broken on master

- was a subtle regression introduced when fixing bug #5753006
- as we are now using SkPaint::kGlyphID_TextEncoding (glyph encoding)
instead of SkPaint::kUTF16_TextEncoding (UTF16 encoding), we need to
force the UTF16 encoding in some cases that are NOT going thru
the TextLayoutCache / Harfbuzz shaping

- fix also breakText() the same way

- also clean some old comment

- Warning: depends also on a CL from Skia for having getBaseGlyphCount() "const"

Change-Id: I3d1fc87f070884876c679b33541f810fbfb5df3f
/frameworks/base/core/jni/android/graphics/Paint.cpp
c511bee87cda99a252d1a62487f47c8f05aee78c 05-Jan-2012 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #5753006 Garbled Labels in Maps

- it was a regression introduced into this CL: https://android-git.corp.google.com/g/#/c/154240/5
- basically needed to set the GlyphID encoding to the Skia Paint as we are now using glyphID resulting
from the Harfbuzz shaping
- also define GlyphID encoding as the default on the Paint class

Change-Id: Idb7c2c57ac67595425ce3be9421258962690fcdd
/frameworks/base/core/jni/android/graphics/Paint.cpp
b02d0ca5553300063e4332192632312600caf4b9 08-Dec-2011 Fabrice Di Meglio <fdimeglio@google.com> Clean TextLayout code and remove RTL_USE_HARFBUZZ

- remove dependencies on ICU
- use TextLayouCache
- remove RTL_USE_HARFBUZZ define (we *are* using Harfbuzz now)
- also fix compilation warning

Change-Id: I022e11703438d07032e49e42724184f6bf16653e
/frameworks/base/core/jni/android/graphics/Paint.cpp
0af10b54bf110653b74cb92793484b412a90b657 19-Nov-2011 Fabrice Di Meglio <fdimeglio@google.com> Improve TextLayoutCache performances

- introduce TextLayoutEngine
- reduce calls to HB_NewFace as they are opening the font files under the cover
- refactor code for removing FontData structure
- fix logging

Change-Id: Id9658fcd454b74c34ecf4e9dfd1bd2201e04b988
/frameworks/base/core/jni/android/graphics/Paint.cpp
5c863f741e8e484bb39decd516c9fa4c6322e671 06-Oct-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #5371117 Regression : The Hebrew / Arabic text behavior in ICS latest build is wrong

- welcome back start / count
- goodbye log clusters
- clean Paint code
- make private some functions as they should be
- improve memory allocation (create only one Shaper and reuse it for for shaping the runs in
the same input text)

Change-Id: I89a320c7f041319851308c8c9a919fbeafa82cdd
/frameworks/base/core/jni/android/graphics/Paint.cpp
79df5323e7ed541b854cea5684a89e8be8c2dfc9 20-Sep-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #5332081 TextLayoutCache needs to be able to have more cache hits

- makes TextLayoutCache not carring about start/count. Basically he will cache the result for
the full string and gives back the "chunk" corresponding to start/count
- changed the TextLayoutCacheValue API to take start/count parameters
- add Harfbuzz LogClusters in TextLayoutCacheValue as it is needed for extracting the start/count "chunk"

Change-Id: I4b38a4442428606de9a093303bbbe98181e1f89c
/frameworks/base/core/jni/android/graphics/Paint.cpp
9c418dbc56efd334c68872d281f75138e16eae46 18-Sep-2011 Fabrice Di Meglio <fdimeglio@google.com> Revert "Fix bug #5332081 TextLayoutCache needs to be able to have more cache hits"

This reverts commit d686d76814f18061e06995df0d5de9feb9f70a7e
/frameworks/base/core/jni/android/graphics/Paint.cpp
d686d76814f18061e06995df0d5de9feb9f70a7e 14-Sep-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #5332081 TextLayoutCache needs to be able to have more cache hits

- makes TextLayoutCache not carring about start/count. Basically he will cache the result for
the full string and gives back the "chunk" corresponding to start/count
- changed the TextLayoutCacheValue API to take start/count parameters
- added the Harfbuzz LogClusters in TextLayoutCacheValue as it is needed for extracting the start/count "chunk"
- fix potential issue of cache key leaking

Change-Id: I9276f9bec744e8de36349acfba8429f7c6f83394
/frameworks/base/core/jni/android/graphics/Paint.cpp
51f383d65f9ee3c7d73d0508b576550e7998c5b5 14-Sep-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix some TextLayoutCache issues

- wrong ContextCount was passed
- better logs

Change-Id: Ie78ba70f98f3cf017c168ab8848cc080fc175f31
/frameworks/base/core/jni/android/graphics/Paint.cpp
f43fa5746ee5b81a6e386d36594094d079ac8160 13-Aug-2011 Dianne Hackborn <hackbod@google.com> Turn off hinting by default for higher density displays.

Also adds an API for apps to control whether hinting is used.

Change-Id: I1a06b06255fbb8d0f02a8ce48c2cd60019088ed3
/frameworks/base/core/jni/android/graphics/Paint.cpp
6ab90ed017fb52aac4493a2fac897299d345874f 09-Aug-2011 Fabrice Di Meglio <fdimeglio@google.com> Solidify and optimize Paint text related APIs

- better check parameters consistency
- return calls as soon as possible (when null or empty text)

Change-Id: I46744e517b04e3fba0ec37132d7de400177f214b
/frameworks/base/core/jni/android/graphics/Paint.cpp
8fb507171f68d4170cfeb1187ee7d1f70f98917d 14-May-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix bug #4415576 Gmail text looks broken

- pass correct "contextCount" when needed

Change-Id: I56ebd9486e99e6ca5a3973ec403cf1ced874b4c3
/frameworks/base/core/jni/android/graphics/Paint.cpp
0a1413e4bf9dcda2a8abb2287e43f612a7fb2453 22-Apr-2011 Fabrice Di Meglio <fdimeglio@google.com> Clean getTextRunAdvances() APIs

- remove ICU reference in API names
- use a "reserved" int parameter to pass either "0" for Harfbuzz or "1" for "ICU"

Change-Id: I88b4f76feafd203a6999cd7349402fa36a9a4b2a
/frameworks/base/core/jni/android/graphics/Paint.cpp
4f810c8535055bd9a8d89a7d1ba0a7c712a8843d 19-Apr-2011 Fabrice Di Meglio <fdimeglio@google.com> Use Harfbuzz for Paint drawText / measureText / breakText APIs

Change-Id: I35aa02bfd45629bf5c560f98a28399ff3d0fc900
/frameworks/base/core/jni/android/graphics/Paint.cpp
8451b25a4422656bbd6657a5855e69c0f4d53c74 08-Apr-2011 Elliott Hughes <enh@google.com> Use jniThrowException for exception throwing from native code.

I'll do media and the generated gl stuff separately. Otherwise, this
cleans up all direct calls of ThrowNew/Throw except the one in the
binder that needs to remain.

Change-Id: I8f95a5f020f53b25926ad31ac0c9477ddf85d04b
/frameworks/base/core/jni/android/graphics/Paint.cpp
1de9e7a9dffb4391a446000f748e4c017d948f6b 05-Apr-2011 Fabrice Di Meglio <fdimeglio@google.com> Code refactoring for TextLayoutCache

- rename TextLayoutCache entry name
- update references to old name
- better variable names in TextLayoutCache::getRunAdvances()

Change-Id: I5173fbc8af79437ce4786084580426f130120ce8
/frameworks/base/core/jni/android/graphics/Paint.cpp
eee49c699c035ffba188417489f40d34f587d65c 25-Mar-2011 Fabrice Di Meglio <fdimeglio@google.com> Fix text redering issue where the text was sometimes truncated

- mostly was visible in Settings apps / Wi-Fi networks summary info for each network
- correctly setup the local SkPaint for advances computation
- improve test app for adding live resizing

Change-Id: Ia031fe1b115b521ba55c7e68f2a26300f02e48ca
/frameworks/base/core/jni/android/graphics/Paint.cpp
9f82b580d744ce4baf057b061994394dcf239eed 08-Mar-2011 Fabrice Di Meglio <fdimeglio@google.com> Use Harfbuzz instead of ICU4C for computing advances

- use Harfbuzz shaper for shaping and getting glyphs
- add test app for showing result of drawText() and drawGlyphs()
- add private API in Canvas and Paint for test app

Change-Id: Ia15be216f8636d2d864066e9b7de2f53008c30f6
/frameworks/base/core/jni/android/graphics/Paint.cpp
d98aa2de9ab18e09c2be1997f41212740f51f6e6 26-Oct-2010 Chet Haase <chet@google.com> DisplayList optimizations and fixes.

We now use a copy of SkPaint objects to avoid having it changed from under us.
We reuse copies that have not changed. We also copy the SkMatrix every time to
avoid the same problem.

Change-Id: If3fd80698f2d43ea16d23302063e0fd8d0549027
/frameworks/base/core/jni/android/graphics/Paint.cpp
27f0b17d853d8bef918c3d869044e50cf3904ee3 22-Oct-2010 Chet Haase <chet@google.com> Fix native resource leak when OpenGL renderer is not being used.

Native resources (bitmaps, matrices, paints, shaders) are shared when display lists
are used, and a refcounting system is in place to take care of disposing when all
clients are finished with them. But the cache where these refcounts are tracked is
not enabled when the Open GL renderer is not being used. This results in the native
destructors not being called, and the resources are leaked.

Change-Id: Ic7aeb55e4636dcad229846601407e596160346e6
/frameworks/base/core/jni/android/graphics/Paint.cpp
5c13d89c1332fcc499379b9064b891187b75ca32 08-Oct-2010 Chet Haase <chet@google.com> Optimizing display lists by referencing pointers to resources instead of copying them

Change-Id: I81ad3551d74aa1e5bb64d69e33d2eb29a6c1eb6a
/frameworks/base/core/jni/android/graphics/Paint.cpp
1e45aae5de003657e5d18f74d34998f5de5db5b7 14-Aug-2010 Romain Guy <romainguy@google.com> Add drop shadows.

Change-Id: Ic6a72409d4785968d1fbdff229f17ee5c00b240b
/frameworks/base/core/jni/android/graphics/Paint.cpp
f7cb1f75fdaedf996cab7c4690b080adc7bc5b97 02-Jul-2010 Doug Felt <dougfelt@google.com> Support bidi/shaping for getTextPath

Move layout-related code into separate class since it's needed by both
canvas and paint.

Change-Id: Iba89a1d94d7cca650255ffa3cbc952b988a51b54
/frameworks/base/core/jni/android/graphics/Paint.cpp
0c702b88c5d0d4380930b920f5be6e66dd95a0d8 14-May-2010 Doug Felt <dougfelt@google.com> Move shaping to native.

Add internal API (getTextRunAdvances) to Paint, use when measuring.
Add internal API (getTextRunCursor) to Paint, use when determining
valid cursor positions.

Remove java-level shaping code. Remove 'prep' code in TextLine
(except for replacement text) since shaping now is done on the fly as
needed in native.

Provide explicit shaping context bounds to internal text measuring,
cursor movement, and rendering APIs.

Update for to changes in external API in ushape.h.

Change-Id: I146958b624802ce8553125e5c3c6c03031bc9608
/frameworks/base/core/jni/android/graphics/Paint.cpp
afa78967b8553443aa32579d78970a076d7581f6 29-Sep-2009 Dianne Hackborn <hackbod@google.com> Hack to fix issue #2125365: Sports Trivia compatability with Eclair

Adds a mechanism to tell Paint the scaling factor its target
canvas will have, for it to compute font metrics based on the
correct font size. Only TextView uses this, but that is enough
for the large majority of apps.

Change-Id: I6cacaa0dd26d40ee3ad959bed0028678d6e9016e
/frameworks/base/core/jni/android/graphics/Paint.cpp
3d63e0119dc763ed0a06fd7498375746fd391d80 27-Jul-2009 Mike Reed <reed@google.com> explicitly set the hinting level for android apps (to match the old default)
/frameworks/base/core/jni/android/graphics/Paint.cpp
290f5baf9192752287723a29ede4399ae3e4c826 19-Jun-2009 Mike Reed <reed@google.com> when we reset a paint, it should return to the state it was in when it was first created.
for java, this means setting its text-encoding to UTF16...
/frameworks/base/core/jni/android/graphics/Paint.cpp
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/jni/android/graphics/Paint.cpp
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/jni/android/graphics/Paint.cpp
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/core/jni/android/graphics/Paint.cpp
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/jni/android/graphics/Paint.cpp