292 Commits

Author SHA1 Message Date
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
Steve Block
a51f0e707f Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF)
Change-Id: I8fbdfa7a7581f481968dbb65aa40f7042936d7cb
2012-01-19 14:44:59 -08:00
Steve Block
933e856150 Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF)
Change-Id: I26f76452ac49e2890b14d133c065493d8df0fb4a
2012-01-19 14:44:56 -08:00
Steve Block
1afd5bab4e Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF)
Change-Id: I44f267700356967dc51e8f85ebf457dc85cfb229
2012-01-19 14:44:50 -08:00
Steve Block
06ade6ae1b Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF)
Change-Id: I5321ebd12e9c6248a108529e82c4e1af2a4405e3
2012-01-19 14:44:31 -08:00
Steve Block
ad3f5145fe Rename (IF_)LOG() to (IF_)ALOG()
Change-Id: If49c81a2793182771c6160fbca93905daa6f44c1
2012-01-18 11:08:20 +00:00
Fabrice Di Meglio
a0a117b4c1 Fix bug #5822825 Paint.measureText (char[] text, int index, int count) cannot handle text more than 32K long - DO NOT MERGE
- do not clear the smart pointer when the cache entry does not fit the cache size

See http://code.google.com/p/android/issues/detail?id=23337

Change-Id: Id4533d9f8a396c310c9215157ec5a4c07f30c7f2
2012-01-05 14:34:42 -08:00
Fabrice Di Meglio
99cdc6a3b5 Fix TextLayoutCache issue when loading Font tables (DO NOT MERGE)
- disable GSUB / GPOS table loading

Change-Id: I2ae058c9d926242586f90dc2a98302ff886f1fe1
2011-12-06 15:31:19 -08:00
Jeff Brown
f98c2a67fe Fix memory corruption issues in TextLayoutCache. (DO NOT MERGE)
Ensure log_clusters array is big enough.
Bug: 5714171

Explicitly handle the cases where the entire string or a single
run might have a length of 0.
Harfbuzz assumes the length of the item is at least 1.
If the length is zero, then it will clobber memory at index -1
into the log_clusters array.
Bug: 5705479

Change-Id: If28a9866221081f69973c1d12d7fe0cf8db2edd0
2011-12-05 20:40:03 -08:00
Mathias Agopian
c93a151fde Merge "Define, document, and test the behavior of very large SurfaceTextures" into ics-mr1 2011-11-14 11:49:42 -08:00
Jeff Brown
6f0464e79d am f1f0c873: Fix bug in TextLayoutCacheKey handling embedded nulls.
* commit 'f1f0c873b1d119a19342cb67ca77b59607951659':
  Fix bug in TextLayoutCacheKey handling embedded nulls.
2011-11-11 19:22:04 -08:00
Mathias Agopian
b89d88f531 Define, document, and test the behavior of very large SurfaceTextures
updateTexImage() now throws a runtime exception when its native
counterpart fails

Bug: 5506633

Change-Id: I151a6f685d465966e7df4df624412ab2da62e95f
2011-11-11 18:44:35 -08:00
Jeff Brown
f1f0c873b1 Fix bug in TextLayoutCacheKey handling embedded nulls.
We were not passing the length of the UTF-16 string to
String16::setTo.  As a result, it was copying the contents of
the text up to the first null it found.

First problem, these strings are not typically null terminated!

Second problem, if the string contained a null character, then
we might truncate it.  However, we only truncated the string
when the copy constructor was invoked (say, when we called
get() on the cache) but not in internalTextCopy() (before
adding the key to the cache).

As a result of the second problem, we would first search
the cache for a key that matched a partially copied truncated
string (potentially reading uninitialized memory that followed it).
Finding none, we would add the entry to the cache using
the correct key.

If the cache already had a value associated with the correct key,
then the put would fail, returning false.  Charging ever onwards,
we would add the size of the entry to the cache size.

Proceeding in this manner, it was possible for the cache to
believe it had less remaining space than it really did.  At that
point, it was possible for the cache to evict all entries and
yet still not think it had room to add a new one, so it would
continue trying to make space indefinitely.

Bug: 5576812
Change-Id: I05251594f6b2da0a5dc09f7200f04fe9100ec766
2011-11-11 15:41:40 -08:00
Fabrice Di Meglio
07b4b31453 am bcf05a69: Fix bug #5553401 TextLayoutCache is too verbose: "computeValuesWithHarfbuzz -- need to force to single run"
* commit 'bcf05a69090f342d328f1537d1d83406b883290b':
  Fix bug #5553401 TextLayoutCache is too verbose: "computeValuesWithHarfbuzz -- need to force to single run"
2011-11-02 02:17:48 +00:00
Fabrice Di Meglio
bcf05a6909 Fix bug #5553401 TextLayoutCache is too verbose: "computeValuesWithHarfbuzz -- need to force to single run"
- make single run case non verbose

Change-Id: I5c3b87aeb613697233290ddecac3ca00f58f8313
2011-11-01 17:58:00 -07:00
Fabrice Di Meglio
904221a342 Fix bug #5504346 Hung in native_getTextRunAdvances - DO NOT MERGE
- better check of ICU returned values
- default to single run if ICU is returning errors

Change-Id: I836818bda4fc72a27b2201f01023cd23c5d99ecb
2011-11-01 12:47:51 -07:00
Fabrice Di Meglio
26e9ee28de Fix bug #5504346 Hung in native_getTextRunAdvances - DO NOT MERGE
- better check of ICU returned values
- default to single run if ICU is returning errors

Change-Id: I836818bda4fc72a27b2201f01023cd23c5d99ecb
2011-11-01 10:49:44 -07:00
Fabrice Di Meglio
44cd3f8f3d Merge "Fix compilation issue when DEBUG_GLYPHS define is activated" 2011-10-20 18:58:03 -07:00
Fabrice Di Meglio
a99ed6284e Fix compilation issue when DEBUG_GLYPHS define is activated
Change-Id: I61693952ffdc02f77058311fc982fbbf8df24c6c
2011-10-19 16:40:02 -07:00
Romain Guy
2c183fa5bf Notify a Bitmap is has changed when calling copyPixelFromBuffer
Change-Id: Ibff1a162edfe11473c5c167e764405bf83ec5822
2011-10-18 17:56:06 -07:00
Fabrice Di Meglio
5c863f741e 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
2011-10-07 11:22:39 -07:00
Jeff Brown
6579a9d6fe Transfer large bitmaps using ashmem.
Bug: 5224703

Change-Id: If385a66adf4c6179a0bb49c0e6d09a9567e23808
2011-10-03 17:28:13 -07:00
Fabrice Di Meglio
8ebf1efd66 Merge "Fix potential issue with the TextLayoutCache with glyphs" 2011-10-03 09:56:39 -07:00
Fabrice Di Meglio
155fa38a71 Fix potential issue with the TextLayoutCache with glyphs
- there may be a mapping of one char to many glyphs

Change-Id: I48846d176d61dc8d8e513ca144fdf8ad805e63b7
2011-09-30 17:24:35 -07:00
Fabrice Di Meglio
717060b076 Improve TextLayoutCache performances a bit
- the gain is about 5% and the timing is more stable
- use compare_type() and strictly_order_type()

Change-Id: Iab81869a8ba461ce786a468b6c59b8f34e8db838
2011-09-30 14:08:25 -07:00
Fabrice Di Meglio
5293cea4e0 Fix bug # 5376028 Arabic text is kinda broken - disappearing glyphs
- make the log clusters happy

Change-Id: I73ca9512f0ca02549dad5270d6ec198ae9b00a4e
2011-09-26 18:29:54 -07:00
Fabrice Di Meglio
79df5323e7 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
2011-09-21 20:02:47 -07:00
Jeff Brown
7aac297960 TextLayoutCacheKey needs to store start and count.
Bad merge.

Change-Id: Id6507b3a7e35808a6d34501a45d79fcb7470657d
2011-09-19 16:19:13 -07:00
Fabrice Di Meglio
4dd99e5912 TextLayoutCache code refactoring
- use vector (instead of array) for advances and glyphs
- reverse glyphs directly in computeRunValuesWithHarfbuzz() (instead of reversing them after)

Change-Id: I716a8f914fd043818d7cb80cca76ee5fb0effb96
2011-09-19 14:46:37 -07:00
Fabrice Di Meglio
e0d558ac92 Merge "Fix potential leak in TextLayouCache" 2011-09-19 11:41:01 -07:00
Fabrice Di Meglio
54dc642cc1 Make TextLayoutCache no more dependent on ICU
- move ICU call to TextLayout

Change-Id: Id5a21e7b69e484536cfb5b86fbb0c112fb661dfa
2011-09-18 15:38:08 -07:00
Fabrice Di Meglio
e74fef3b55 Fix potential leak in TextLayouCache
- need a copy constructor for the key as the GenerationCache we are using
is actually a KeyedVector<K, sp<Entry<K, V> > >
- use the getText() API to access the text in the cache key

Change-Id: I5b60ebc062b62308ed7ac1284cfe2a9f28e2b8b1
2011-09-18 14:30:21 -07:00
Fabrice Di Meglio
9c418dbc56 Revert "Fix bug #5332081 TextLayoutCache needs to be able to have more cache hits"
This reverts commit d686d76814f18061e06995df0d5de9feb9f70a7e
2011-09-18 12:54:38 -07:00
Fabrice Di Meglio
d686d76814 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
2011-09-16 13:47:34 -07:00
Fabrice Di Meglio
51f383d65f Fix some TextLayoutCache issues
- wrong ContextCount was passed
- better logs

Change-Id: Ie78ba70f98f3cf017c168ab8848cc080fc175f31
2011-09-13 15:57:58 -07:00
Fabrice Di Meglio
163268b3a8 Fix bug #5274332 TextLayoutCache is having multiple instances
- also fix the missing LOG_TAG define

Change-Id: I25e96d1ba372e84768604f18702e0724fdecefb0
2011-09-07 18:25:58 -07:00
Fabrice Di Meglio
abb0f299fd Update TextLayout logging
- centralize logging into TextLayoutCache
- add offset logging

Change-Id: I52f229b2a8aed121715b37a5a42936875b23f3c9
2011-08-18 17:59:29 -07:00
Fabrice Di Meglio
5960723061 Fix bug #5174495 Harfbuzz shaping is broken after taking care of Indic
- revert back to old working code where the script was setup for Harfbuzz\
depending of the direction of the run

Change-Id: I7ec740732b51ccf05b6744b7f9d2fcb35555478d
2011-08-16 17:14:20 -07:00
Dianne Hackborn
f43fa5746e Turn off hinting by default for higher density displays.
Also adds an API for apps to control whether hinting is used.

Change-Id: I1a06b06255fbb8d0f02a8ce48c2cd60019088ed3
2011-08-12 18:59:39 -07:00
Ted Bonkenburg
1ee60119c4 Remove ParcelSurfaceTexture and update MediaPlayer
This removes the ParcelSurfaceTexture class since that functionality has been
folded into Surface.java. The change also updates the MediaPlayer to get rid
of setParcelSurfaceTexture() and modifies setTexture() to use the new Surface
functionality in order to simplify the code.

Change-Id: Iafa75ea3188263928128325d8a726786971b4de4
2011-08-11 19:58:25 -07:00
Fabrice Di Meglio
5de5b1a91e Fix Harbuzz shaper for being able to do select other scripts than Common or Arabic
- need to take care of diacritics marks that return HB_Script_Inherited for a script

Change-Id: Icbfea46b305e15849b25410fed07d9cd5dfeb818
2011-08-09 14:37:22 -07:00
Fabrice Di Meglio
6ab90ed017 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
2011-08-08 18:52:27 -07:00
Fabrice Di Meglio
f957618265 Merge "Revert "Adapt TextLayoutCache for new Harfbuzz scripts"" 2011-08-08 12:56:05 -07:00
Fabrice Di Meglio
f09e46e938 Revert "Adapt TextLayoutCache for new Harfbuzz scripts"
This reverts commit 7f4ae758ba4724f7c3031d33ad8e749c11d1e059

This CL created a regression:

#5134317 Arabic Keyboard does not appear
2011-08-08 11:31:39 -07:00
Russell Brenner
adc25267f8 Merge "Adapt TextLayoutCache for new Harfbuzz scripts" 2011-08-04 09:41:53 -07:00
Mathias Agopian
ec46b4e1ca Add a 'release' method to the SurfaceTexture public Java API
Bug: 5063618
Change-Id: I689cb0c01c14e597ccfb4eb0972e64fa570bd4e8
2011-08-03 17:23:44 -07:00