377 Commits

Author SHA1 Message Date
Fabrice Di Meglio
15cc68ced0 Fix bug #6495019 Character gets garbled when locale is changed
- add missing cached data clearing. The Shaper was caching the HB_Face so
clear them too
- do minor code refactoring

Change-Id: Ifa86cc63815bdb4b51ce688cf16e986415b1e8c1
2012-05-15 14:55:49 -07:00
Jeff Brown
8bd8d89693 Merge "Fix possible leak in bitmap decoding." into jb-dev 2012-05-09 17:42:40 -07:00
Jeff Brown
27d8383414 Fix possible leak in bitmap decoding.
In one particular error case, we might exit the function without
destroying the bitmap.

Bug: 6467873 (tangentially related)
Change-Id: I3a213cc0a53023d9d0d2a080aed15774f4c4c10c
2012-05-09 17:30:31 -07:00
Fabrice Di Meglio
92d7f9ff1c Merge "Fix bug #6408393 Character corruption is caused when locale is changed" into jb-dev 2012-05-08 10:54:41 -07:00
Fabrice Di Meglio
30ca5cd11a Fix bug #6408393 Character corruption is caused when locale is changed
- free the TextLayoutCache on Locale change

- also free TextLayoutCache when memory is low

Change-Id: I39a37ac8ec3c292cfb1c0eea4bb41ff71897d089
2012-05-07 20:17:38 -07:00
Fabrice Di Meglio
6162876067 Fix bug #6318791 Replace the Lohit Devanagari and Tamil with Droid versions
- take care of ttf filename changes and regular/bold versions

Change-Id: Ib71d2537df16ff954cef9619c12d611948d19efe
2012-05-07 14:42:56 -07:00
Marco Nelissen
b3482ffbee Merge "Fix crash when decoding bitmap" into jb-dev 2012-05-07 12:09:02 -07:00
Marco Nelissen
b2fe3be4ff Fix crash when decoding bitmap
Externally reported crash when decoding corrupted .wmf file.
b/5048623

Change-Id: I1df0861cd36983cb4d1460caa221c54d3fc240af
2012-05-07 11:24:13 -07:00
Fabrice Di Meglio
cf4284bce1 Update Arabic font for SystemUI
- bug #5987379 Need an Arabic font with metrics "compatible" with Roboto
- use the Alt version with GSUB optimizations

Change-Id: I4d8c62cab37a7b010abab602c39899084d347fdc
2012-05-04 15:14:58 -07:00
Raph Levien
1637dcd16c Use paint typeface for shaping when it supports the requested script.
This is a hackish but workable fix for bug 6415796.

Change-Id: Iaba91e1e53e688a3ee05a1fdb68fd05102e369f2
2012-05-02 12:00:12 -07:00
Raph Levien
b294435b5c Make Arabic script runs longer (for performance) - bug 6426451.
This change avoids selecting the incorrect font for drawing characters
when the first character in a run is a space.

Change-Id: Ibc672560d364b8de8c3e21de1c738c6dc5639395
2012-05-01 13:49:18 -07:00
Dianne Hackborn
7634424171 Fix scaling of layout bounds.
Change-Id: I9d8c8924900fed69030ee3e8d6decee89ca67820
2012-04-30 14:51:48 -07:00
Romain Guy
8f8d9fb52c Keep opaque bitmaps opaque after scaling
Bug #6293845

Change-Id: If9e82993f4c9702244ddedb5667421a6fcc7a0c5
2012-04-26 13:35:36 -07:00
Raph Levien
66556c730d Merge "Improve char mirroring in TextLayoutCache" 2012-04-24 22:38:15 -07:00
Fabrice Di Meglio
3632b7f3ef Improve char mirroring in TextLayoutCache
- now use ICU u_isMirrored() instead of a small hardcoded list of unicode points

see bug #5961254 Harfbuzz should be able to support Bidi_mirrored unicode attribute

Change-Id: I3243a58558a97930f0e7fdf5e9c1d5695d9393de
2012-04-24 19:57:23 -07:00
Raph Levien
57e9723134 Partial fix for bug 6132077 (incorrect line breaking of Arabic text).
Fixed getTextRunAdvances so that advances are correctly aligned with
UTF-16 code point offices, rather than runs being reversed in RTL.

Change-Id: Ife59c0c26f745654c16656c86072e9102d8f6bc7
2012-04-24 16:04:34 -07:00
Jamie Gennis
721bfaa63d SurfaceTexture: fix updateTexImage JNI
Sigh...

Change-Id: I0271bed44c58e0c9a03eda4886eb2c1ee76e041f
2012-04-13 19:14:37 -07:00
Jamie Gennis
2b4bfa5efe SurfaceTexture: update API docs
This change updates the SurfaceTexture API docs and modifies the behavior of
the updateTexImage to produce an IllegalStateException when not attached to a
GLES context.

Change-Id: I5a0875927785108960985c567d571d5f7033256a
2012-04-13 16:04:15 -07:00
Fabrice Di Meglio
62901af52a Merge "Add Paint.setTextLocale()" 2012-04-12 17:37:44 -07:00
Fabrice Di Meglio
517825f1a9 Add Paint.setTextLocale()
- will be used for better shaping CJK and other goodies

Change-Id: If64945a337edd915f5ebb88f04b6fd18e92ca587
2012-04-12 17:31:17 -07:00
Fabrice Di Meglio
276de3e1eb Add new Arabic font for SystemUI
- still work in progress
- bug #5987379

Change-Id: I0a7f7437c9061eab0abc9d5979c947eb5511992a
2012-04-12 16:40:56 -07:00
Jamie Gennis
c6d9930777 SurfaceTexture: add GL context attach & detach
This change adds Java API support for detaching a SurfaceTexture from one GLES
context and then attaching it to a different one.

Change-Id: I8eed4b0d0e339c11598cb0408d9f4f2d99b3aa06
2012-04-05 16:11:43 -07:00
Amith Yamasani
ec4a50428d Embed layout padding in nine patch images
- Added a new custom PNG chunk that carries the layout padding ints.
- Extract the padding ticks from .9.png images and store in the chunk.
- Load the padding information at runtime into Bitmap and NinePatchDrawable.

- The new chunk is ordered first so that it doesn't cause a problem in older
  versions of the platform.

Bug: 6087201

Change-Id: I5de46167a1d44b3ec21065b0c165e594b1dc8399
2012-04-04 12:05:59 -07:00
Fabrice Di Meglio
43e4985abf Fix bug #6248364 Tamil and Denavagari text crash in Google+
- fix initialization of variables

Change-Id: Ibda4e1e6f55f867385eaf9a4c7a754c16815bbf0
2012-03-28 16:05:36 -07:00
Romain Guy
7b2f8b8fb7 Pre-scale bitmaps on the native heap
Change-Id: I9819b532b89a997ab775b31ffee46445f1d16e20
2012-03-19 18:47:06 -07:00
Romain Guy
caf813fe1e Remove unused private API
Change-Id: Iec9c2bc275fc7376f4e0b0b9c44059c56a9dd173
2012-03-15 18:57:48 -07:00
Siva Velusamy
b48e029107 Merge "Expose a function to set OpenGL Trace level." 2012-03-12 18:10:19 -07:00
Chet Haase
a1cff5043d Handle view properties at the native level
Basic functionality of handling View properties (transforms,
left/right/top/bottom, and alpha) at the native DisplayList level.
This logic is disabled for now (via compile-time flags in View.java and
DisplayListRenderer.h) as we continue work on it (there is no advantage
to the new approach until we optimize invalidation and rendering paths
to use the new code path).

Change-Id: I370c8d21fbd291be415f55515ab8dced6f6d51a3
2012-03-12 15:41:48 -07:00
Siva Velusamy
64d10a1da0 Expose a function to set OpenGL Trace level.
This patch adds a function setGlDebugLevel() to libEGL, and
exposes it to the Java layer at android.opengl.GLUtils.enableTracing().

Change-Id: Ia5abb130bc32fcfe3ab25b0a0a5283a54c54f357
2012-03-09 15:25:29 -08:00
Jeff Sharkey
d84e1ce0b5 Split Parcel JNI details away from Binder.
This is purely a refactoring, with no change to the underlying
functionality.

Change-Id: I41b59f14e57d1cc144274a01f77658d99a1bfe02
2012-03-08 16:06:30 -08:00
Fabrice Di Meglio
ff40ab7a41 Fix bug #5180841 TextLayoutCache needs to support Indic
- add Tamil and Devanagari shaping support

Change-Id: I331ec52cd1987e157100deb699db27f855881c32
2012-02-28 14:35:48 -08:00
Romain Guy
325740fb44 Add hooks to implement Canvas.drawTextOnPath() in GL
Change-Id: I165c9e05facf5365aa6850605688e538640c7fcc
2012-02-24 16:48:34 -08:00
Mathias Agopian
b13b9bdad2 frameworks/base refactoring.
step 2: move libutils headers to their new home: androidfw

Change-Id: I14624ba23db92a81f2cb929f104386e1fab293ef
2012-02-17 19:01:26 -08:00
Chih-Chung Chang
fb2cfa223b Comment out a warning message to avoid log spamming.
The warning message happens a lot when the region decoder is used (like
viewing a picture in the Gallery app).

Change-Id: I435f92eac8f322b091f3ed14ee48d0b5f0d84a8a
2012-02-07 13:07:51 +08:00
Jean-Baptiste Queru
0a3f6d69b6 am 33476f7a: am f79bcd2d: am 52da99fa: am a081c7b8: Merge "Skia API changes as a result of an update to the Skia library."
* commit '33476f7ad1c3b4dcaefddb306f315e201c4efb33':
  Skia API changes as a result of an update to the Skia library.
2012-02-06 14:45:36 -08:00
Jean-Baptiste Queru
52da99fac8 am a081c7b8: Merge "Skia API changes as a result of an update to the Skia library."
* commit 'a081c7b8bc5a3ea19fc7562b333fac525b17bc5f':
  Skia API changes as a result of an update to the Skia library.
2012-02-06 14:07:31 -08:00
Fabrice Di Meglio
ffd121233a Merge "Revert back to DroidSansArabic font for SystemUI" 2012-02-03 18:33:49 -08:00
Fabrice Di Meglio
ab8c73882e Fix bug #5929529 Parentheses aren't correctly rendered in RTL context
- do BiDi mirrored char mirroring in TextLayoutCache
- see BiDi mirrored chars list at:

 http://www.unicode.org/Public/6.0.0/ucd/extracted/DerivedBinaryProperties.txt

Change-Id: Ia0af0e252dbb0c55cc689bc9db34e05591bb6ee8
2012-02-02 19:07:02 -08:00
Fabrice Di Meglio
9b255cac77 Revert back to DroidSansArabic font for SystemUI
- see bug #5957987 Revert to use DroidSansArabic instead of DroidNaskh font for Arabic Shaping in SystemUI
- DroidNaskh was having FontMetrics not compatible with Roboto

Change-Id: I9f3031c250f907c80f3992f71d929dc91686e1e5
2012-02-02 18:57:19 -08:00
Derek Sollenberger
889a3fa6ab Skia API changes as a result of an update to the Skia library.
These changes are required to work with r3022 of Skia

Change-Id: Ib7cebeb2eba6790bb38edfc2397b311cf419e17c
2012-01-31 14:08:22 -05:00
Fabrice Di Meglio
a731b082b2 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
2012-01-27 14:24:46 -08:00
Fabrice Di Meglio
e414613bb8 Merge "Fix bug #5901103 all_source_project_146981_Android - Android ICS LQA Regression:FA, AR, HE and TH - Font Corruption" 2012-01-24 16:57:21 -08:00
Fabrice Di Meglio
3941a22bfd Fix bug #5901103 all_source_project_146981_Android - Android ICS LQA Regression:FA, AR, HE and TH - Font Corruption
- use the first char of the "run" instead of the "string" for the BaseGlyphCount

Change-Id: I647528ec912bb69655cf301bbc73b66dc1a6fc82
2012-01-24 16:44:00 -08:00
Fabrice Di Meglio
bd901dee31 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
2012-01-23 13:34:08 -08:00
Jean-Baptiste Queru
12b7da6995 am 6df477be: Merge "Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)"
* commit '6df477be186233e36fc370c4d2db6c1ed928a740':
  Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)
2012-01-19 17:26:12 -08:00
Jean-Baptiste Queru
f3f650db96 am a826f9e2: Merge "Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF)"
* commit 'a826f9e2c4f6329d8d48c927f6e942e78ffaf92f':
  Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF)
2012-01-19 17:26:08 -08:00
Jean-Baptiste Queru
08d3c6e5ba am 4f367f33: Merge "Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF)"
* commit '4f367f3387887c538c81c34cc8becaea6fa5e430':
  Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF)
2012-01-19 17:26:03 -08:00
Jean-Baptiste Queru
7ae84204c1 am ba7f0d2a: Merge "Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)"
* commit 'ba7f0d2a03643ce429421b81febf18fd50473070':
  Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)
2012-01-19 17:25:58 -08:00
Jean-Baptiste Queru
97aa8ee811 Merge ee4618bc
Change-Id: Ie1dc6ad38e7c30636d80f6caef11cf6673144940
2012-01-19 17:18:25 -08:00
Jean-Baptiste Queru
36b48c30ad am c318bbb0: Merge "Rename (IF_)LOG() to (IF_)ALOG()"
* commit 'c318bbb05e02a0080e129623ec8029d31be0d60e':
  Rename (IF_)LOG() to (IF_)ALOG()
2012-01-19 16:59:41 -08:00