2195 Commits

Author SHA1 Message Date
Raph Levien
5472070c4a am 912c3780: am ad3cc4bb: am 217ca3b0: Merge "Fix for bug 7234184 F/TextLayoutCache: Failed to put an entry..." into jb-mr1-dev
* commit '912c37802cd2e3e10495ea4b7c9dc3ccdd1702e5':
  Fix for bug 7234184 F/TextLayoutCache: Failed to put an entry...
2012-10-02 13:09:22 -07:00
Raph Levien
912c37802c am ad3cc4bb: am 217ca3b0: Merge "Fix for bug 7234184 F/TextLayoutCache: Failed to put an entry..." into jb-mr1-dev
* commit 'ad3cc4bb5eda9b5c56a82e8da0ff3e286bd30cfe':
  Fix for bug 7234184 F/TextLayoutCache: Failed to put an entry...
2012-10-02 13:07:01 -07:00
Raph Levien
ad3cc4bb5e am 217ca3b0: Merge "Fix for bug 7234184 F/TextLayoutCache: Failed to put an entry..." into jb-mr1-dev
* commit '217ca3b0d310472e4df1aa4af72769d7c7a5becb':
  Fix for bug 7234184 F/TextLayoutCache: Failed to put an entry...
2012-10-02 13:04:52 -07:00
Raph Levien
217ca3b0d3 Merge "Fix for bug 7234184 F/TextLayoutCache: Failed to put an entry..." into jb-mr1-dev 2012-10-02 13:02:31 -07:00
Raph Levien
832815cb53 Fix for bug 7234184 F/TextLayoutCache: Failed to put an entry...
This bug was triggered by user code concurrently mutating the character
array while calling into a drawText method in another thread. When the
value of the array changed, it caused inconsistent state, leading to
assert failures.

This is arguably bad behavior by the user code, but it shouldn't cause a
native crash. The fix is to do a defensive copy of the text into the
key, so the value is guaranteed to remain constant throughout the text
layout process. The change is mostly deletion of code, because there was
an optimization to try to avoid such a copy. That optimization was not
actually effective, however, because the indexOfKey() operation in the
KeyedVector underlying the TextLayoutCache did the copy anyway. Thus,
even though this change looks like it's introducing a copy where there
wasn't one before, the actual performance impact should be nil.

Note that the ability to handle a mutating argument is now part of the
contract for TextLayoutEngine::getValue(), and is now documented. That
contract may change, as the result of future optimization. Also, care
was taken to only use the value after the copy.

Other performance issues with TextLayoutCache are tracked in bug
7271109.

Change-Id: I9c90e8e4d501f3f37e2f22a7851f032808d46fbe
2012-10-02 12:32:40 -07:00
Ian Rogers
1645620bd7 am bc8c3c05: am 7fef2b8a: Fix target utilization property_get.
* commit 'bc8c3c05a324bd8bb51301d6b51e6d6c419a86a3':
  Fix target utilization property_get.
2012-10-01 17:37:25 -07:00
Ian Rogers
bc8c3c05a3 am 7fef2b8a: Fix target utilization property_get.
* commit '7fef2b8a3782a94e1ad6bfef98807167db300aab':
  Fix target utilization property_get.
2012-10-01 17:35:24 -07:00
Ian Rogers
7fef2b8a37 Fix target utilization property_get.
Copy and paste error where wrong compare meant the code thought a target
utilization option was specified even if there wasn't one.

b/7062303

Change-Id: Ibf1c6cf72743c5fbec7618a719d12d0373184754
2012-10-01 17:30:32 -07:00
Ian Rogers
e983008863 Fix target utilization property_get.
Copy and paste error where wrong compare meant the code thought a target
utilization option was specified even if there wasn't one.

b/7062303

Change-Id: Ibf1c6cf72743c5fbec7618a719d12d0373184754
2012-10-01 14:59:39 -07:00
Chet Haase
d2e74f3400 am 1dd00221: am bcdaf8cb: am 62ea4363: Merge "Fix texture corruption" into jb-mr1-dev
* commit '1dd002214e9734aa862db9b7e7092aacd737e46d':
  Fix texture corruption
2012-10-01 11:17:35 -07:00
Chet Haase
1dd002214e am bcdaf8cb: am 62ea4363: Merge "Fix texture corruption" into jb-mr1-dev
* commit 'bcdaf8cb6d75d721507739504732e0e3dc7f437c':
  Fix texture corruption
2012-10-01 10:16:25 -07:00
Chet Haase
bcdaf8cb6d am 62ea4363: Merge "Fix texture corruption" into jb-mr1-dev
* commit '62ea4363362526d32b48f920601d3b4e27a117bb':
  Fix texture corruption
2012-09-30 15:56:39 -07:00
Chet Haase
6a2d17f713 Fix texture corruption
When memory gets low on a device, activities flush everything they can.
Hardware-accelerated activites, such as Launcher, flush GL resources and destroy
the GL context. However, some resources were still hanging around, due to deferred
destruction policies (we don't delete layers until the DisplayLists they are in
are finalized, to ensure we don't deref deleted objects). This meant that we were
referring to obsolete GL data in these objects. in particular, it meant that we might
come around later, after a new GL context was created, and delete a texture object
that was incorrect. We use the layer's "texture id" to refer to the texture underlying the
layer. But if there's a new GL context, then this texture ID is no longer valid, and
we may be deleting the texture that a different object (layer, icon, whatever) is referring
to, because the driver may return that same ID under the new GL context.

The fix is to more aggressively delete things that we know will not be used again
when the GL context is destroyed. In particular, we delete all resources being used
by all DisplayLists at GL context destruction time.

Issue #7195815 Textures corruption on all devices, in many apps

Change-Id: I52d2d208173690dbb794a83402d38f14ea4c6c22
2012-09-30 15:35:08 -07:00
Raph Levien
5827b5f7b0 am 34614e63: am 54801e12: Merge "Fix for bug 6936752 Tamil text gets truncated on right-hand side" into jb-mr1-dev
* commit '34614e63dced2b0479ab721494fd867604023619':
  Fix for bug 6936752 Tamil text gets truncated on right-hand side
2012-09-28 11:19:30 -07:00
Raph Levien
25cd09344f am 54801e12: Merge "Fix for bug 6936752 Tamil text gets truncated on right-hand side" into jb-mr1-dev
* commit '54801e120a2275037e37f065926b81d9f6e4b3d5':
  Fix for bug 6936752 Tamil text gets truncated on right-hand side
2012-09-28 11:17:34 -07:00
Raph Levien
54801e120a Merge "Fix for bug 6936752 Tamil text gets truncated on right-hand side" into jb-mr1-dev 2012-09-28 11:14:48 -07:00
Jeff Sharkey
de6a028a3e am 40642722: am dd78d462: Fix JNI method signature.
* commit '406427225b43ea63940c7b32b5ff91eeffd6d64d':
  Fix JNI method signature.
2012-09-26 18:53:15 -07:00
Jeff Sharkey
f32fad0fe7 am dd78d462: Fix JNI method signature.
* commit 'dd78d462f6dceac71f9d1cbb723bb38a3b5bdc2e':
  Fix JNI method signature.
2012-09-26 18:52:07 -07:00
Jeff Sharkey
dd78d462f6 Fix JNI method signature.
Change-Id: I156624e0ac55330f43d9c4d7f15d59f6c529aa0a
2012-09-26 18:46:08 -07:00
Glenn Kasten
573028be3b am 59860362: am 2832136b: Merge "Implement android.media.AudioManager.getProperty()" into jb-mr1-dev
* commit '59860362a4ff99d3e7bc7ca95a266915b35d2af6':
  Implement android.media.AudioManager.getProperty()
2012-09-26 10:07:30 -07:00
Glenn Kasten
6931f5529d am 2832136b: Merge "Implement android.media.AudioManager.getProperty()" into jb-mr1-dev
* commit '2832136bb6fcace61ef078051e94aa0a841aac15':
  Implement android.media.AudioManager.getProperty()
2012-09-26 08:53:23 -07:00
Glenn Kasten
c6c4365ddb Implement android.media.AudioManager.getProperty()
Bug: 6635041
Change-Id: I0e7d53b99559cdc89f2f107f23048e4b1a8dd383
2012-09-25 17:01:40 -07:00
Romain Guy
f5481b7332 am 9e309c2f: am 64339168: Merge "Don\'t destroy the same texture twice Bug #7221449" into jb-mr1-dev
* commit '9e309c2f5b747dbbac4ac2c1fe8452c8e22f3132':
  Don't destroy the same texture twice Bug #7221449
2012-09-25 13:30:04 -07:00
Ian Rogers
6ec13912f9 am ce431c3d: am a8a7e714: Merge "Extra GC heap configuration parameters." into jb-mr1-dev
* commit 'ce431c3dbfd98a7f9e57a9e9f0ffbcf89954257a':
  Extra GC heap configuration parameters.
2012-09-25 13:29:49 -07:00
Romain Guy
5efef2a282 am 64339168: Merge "Don\'t destroy the same texture twice Bug #7221449" into jb-mr1-dev
* commit '64339168c4ff0b3ac249398811db7c88eca8f95c':
  Don't destroy the same texture twice Bug #7221449
2012-09-25 12:50:37 -07:00
Ian Rogers
ae592bf4b7 am a8a7e714: Merge "Extra GC heap configuration parameters." into jb-mr1-dev
* commit 'a8a7e7140d8d2f231707712d329a24cf32184299':
  Extra GC heap configuration parameters.
2012-09-25 12:50:16 -07:00
Jean-Baptiste Queru
3142c96e89 am 908a4323: Merge into jb-mr1-dev
* commit '908a43234aca51af5021249c03030cec6b36417f':
  Add a property to disable libhwui's scissor optimization Bug #7158326
2012-09-25 12:46:32 -07:00
Romain Guy
ef09a210dd Don't destroy the same texture twice
Bug #7221449

SurfaceTexture already deletes the GL texture when detachFromContext
is invoked. The newly introduced refcount would casue the Layer
object to be destroyed later and attempt to delete the GL texture
again. By the time the second cleanup occurs, the texture name
might have been reused by somebody else, resulting in erroneous
behaviors.

Change-Id: I257c589fea64b34c00f46fbfaa7732e6854a5e41
2012-09-25 12:22:21 -07:00
Ian Rogers
a8a7e7140d Merge "Extra GC heap configuration parameters." into jb-mr1-dev 2012-09-25 11:34:35 -07:00
Raph Levien
1b10241a8f Fix for bug 6936752 Tamil text gets truncated on right-hand side
The getTextRunAdvances() method wasn't accounting for the true width of
the text. On closer examination, in Tamil the clusters consist of a
number of glyphs each of which has a nonzero advance (in some other
scripts, the first glyph in the cluster has an advance, and others are
effectively zero). Previously, we were just using the advance of the
first glyph in the cluster. This patch changes the behavior to sum the
advances of all the glyphs within the cluster.

Change-Id: I77a51235f4bb0dfaa72cbb920a8c3b217ad25404
2012-09-24 16:14:38 -07:00
Romain Guy
da42438cf7 Merge "Add a property to disable libhwui's scissor optimization Bug #7158326" into jb-mr1-dev 2012-09-24 15:11:03 -07:00
Romain Guy
87e2f757be Add a property to disable libhwui's scissor optimization
Bug #7158326

When scissor optimization is enabled, OpenGLRenderer will attempt to
minimize the use of scissor by selectively enabling and disabling the
GL scissor test.
When the optimization is disabled, OpenGLRenderer will keep the GL
scissor test enabled and change the scissor rect as needed.
Some GPUs (for instance the SGX 540) perform better when changing
the scissor rect often than when enabling/disabling the scissor test
often.

Change-Id: Idb68862e287a23358f9188d577ae0f86161902fd
2012-09-24 11:47:52 -07:00
Eino-Ville Talvala
5d0c5079ce am eace371e: am 5ce25d71: Merge "NEW_API: Add android.hardware.Camera.CameraInfo#canDisableShutterSound" into jb-mr1-dev
* commit 'eace371ee01f8e61731d86110ec84258994eeded':
  NEW_API: Add android.hardware.Camera.CameraInfo#canDisableShutterSound
2012-09-24 00:51:20 -07:00
Jeff Brown
d571122db5 am 1022a785: am 3ca59713: Merge "Support HDMI hotplug." into jb-mr1-dev
* commit '1022a785e52384dc8503127df1ceaababcd88a1a':
  Support HDMI hotplug.
2012-09-24 00:51:06 -07:00
Ian Rogers
5325010486 Extra GC heap configuration parameters.
Allows parameters to increase the maximum free size. b/6606849

Change-Id: Ia74ccdbb8e32954820e3bd26f441b2c2fac889f4
2012-09-23 16:38:03 -07:00
Eino-Ville Talvala
09a792c7fd am 5ce25d71: Merge "NEW_API: Add android.hardware.Camera.CameraInfo#canDisableShutterSound" into jb-mr1-dev
* commit '5ce25d717059c9c37618aa349314077f99ac34c7':
  NEW_API: Add android.hardware.Camera.CameraInfo#canDisableShutterSound
2012-09-21 17:49:51 -07:00
Jeff Brown
919a4cdfe2 am 3ca59713: Merge "Support HDMI hotplug." into jb-mr1-dev
* commit '3ca5971339c7eba61388aa3e26a1b3d02c5ccdf6':
  Support HDMI hotplug.
2012-09-21 17:49:35 -07:00
Romain Guy
18c166bcd6 am 3f7c246f: Merge "Update layers in a single batch at the beginning of a frame Bug #7186819" into jb-mr1-dev
* commit '3f7c246f3ea85af9fb98cba37387bb55658d4614':
  Update layers in a single batch at the beginning of a frame Bug #7186819
2012-09-21 17:46:55 -07:00
Raph Levien
73d2c347cb am 3034d451: Merge "Fix for native crash on image decode OOM" into jb-mr1-dev
* commit '3034d45104f954eb15937e03ec74d86ca37894dc':
  Fix for native crash on image decode OOM
2012-09-21 17:44:54 -07:00
Eino-Ville Talvala
5ce25d7170 Merge "NEW_API: Add android.hardware.Camera.CameraInfo#canDisableShutterSound" into jb-mr1-dev 2012-09-21 16:05:59 -07:00
Jeff Brown
e87bf03076 Support HDMI hotplug.
Bug: 7206678
Change-Id: Ia5212b16658a5f5a2ccf8528eca7bebd45ca857a
2012-09-21 15:34:32 -07:00
Zhihai Xu
ad577aae75 am 77f6677b: Merge "ISSUE 6849488 Bluedroid stack, remove system/bluetooth." into jb-mr1-dev
* commit '77f6677bcddad7c626ef5432eead4031c24f4685':
  ISSUE 6849488 Bluedroid stack, remove system/bluetooth.
2012-09-21 13:34:26 -07:00
Romain Guy
7fdf367d7a am 0b697061: am 3f7c246f: Merge "Update layers in a single batch at the beginning of a frame Bug #7186819" into jb-mr1-dev
* commit '0b69706103dc6ddf765fa2e86265a6428f6728bb':
  Update layers in a single batch at the beginning of a frame Bug #7186819
2012-09-21 12:46:59 -07:00
Romain Guy
3f7c246f3e Merge "Update layers in a single batch at the beginning of a frame Bug #7186819" into jb-mr1-dev 2012-09-21 10:50:12 -07:00
Romain Guy
11cb642756 Update layers in a single batch at the beginning of a frame
Bug #7186819

Change-Id: Ice5926dfedfb3be3a3064e65008dafa2852407da
2012-09-21 00:39:43 -07:00
Raph Levien
8cba91d0d1 am 8b0851ca: am 3034d451: Merge "Fix for native crash on image decode OOM" into jb-mr1-dev
* commit '8b0851caf26dfd5e1cc7798e5ff6c6adc3a5e92c':
  Fix for native crash on image decode OOM
2012-09-20 23:30:48 -07:00
Raph Levien
3034d45104 Merge "Fix for native crash on image decode OOM" into jb-mr1-dev 2012-09-20 23:25:26 -07:00
Raph Levien
005bfc694d Fix for native crash on image decode OOM
When decoding an image with scaling, if the allocation of the bitmap
data for the scaled bitmap failed, we were just ignoring it and going
on. This was yielding strange native crashes (bug 7196860 and bug
7175536). This patch checks whether the allocation succeeds, and returns
a null bitmap if not.

Of course, if the app really is OOM because it's allocated too many
bitmaps, it'll still get the OOME, but that's a lot nicer than a native
crash or memory corruption.

Change-Id: I8384059ab11c2ab9e93e283b9438d79e6709b7b1
2012-09-20 22:51:47 -07:00
Zhihai Xu
8bd9e0cdc1 am 03a896b6: am 77f6677b: Merge "ISSUE 6849488 Bluedroid stack, remove system/bluetooth." into jb-mr1-dev
* commit '03a896b6d8971e54a72e90d9373d162f6a4d8f40':
  ISSUE 6849488 Bluedroid stack, remove system/bluetooth.
2012-09-20 20:27:42 -07:00
Zhihai Xu
77f6677bcd Merge "ISSUE 6849488 Bluedroid stack, remove system/bluetooth." into jb-mr1-dev 2012-09-20 16:41:02 -07:00