7894 Commits

Author SHA1 Message Date
Martin Wallgren
f12af5e907 RRO: Synchronize access to overlays.list
idmap --scan is executed as a part of the pre-loading in ZygoteInit.
The pre loading is executed in parallel for each supported architecture
(32/64 bit). This will cause a race condition in the creation of the
overlays.list file and the idmap files for the system overlays.

Apply flock on overlays.list to prevent the file from being thrown away
and recreated when it is in use by another Zygote.

Bug: 28032298

Change-Id: I51d39f121d207b11181340b68b164b60020f0c61
2016-10-12 15:42:04 +09:00
Doris Liu
fc9cf72339 Fix SkShader leak for Gradient VectorDrawable and test
This CL fixes a SkShader leak in VD when applying local matrix
to the shader. Specifically, the usage of newWithLocalMatrix(...)
increments the shader's ref count in every draw() call for
Gradient VectorDrawable, whereas there's no balancing call to
decrement the ref count in draw(). In this CL, we assume
the ownership of the shader returned from newWithLocalMatrix(...)
to ensure the correct ref count management.

Also, add test to verify that shader is no longer being leaked

BUG: 32067647
Test: this CL

Change-Id: Ic15fe46cde06a73d81b44e2d3c56b51907344cc0
2016-10-12 01:22:11 +00:00
sergeyv
e830f351e1 Turn off additional logging in text rendering am: 5bb5626599
am: 4778f6a43e

Change-Id: If031a1d480d8c2e75e9f6268d15c8ccc098a0268
2016-10-11 00:54:34 +00:00
sergeyv
4778f6a43e Turn off additional logging in text rendering
am: 5bb5626599

Change-Id: Ic7f6c59ca2c3a92f81bf55a8916e20d99fcc01a7
2016-10-11 00:43:32 +00:00
John Reck
85ddb2df2f Fix SurfaceViewPositionListener race bugs
Bug: 29628138

1: Make windowPositionLost synchronous as that's
what the Java side was expecting

2: Make the listener ref counted as otherwise
there's a race condition with the GC, which could
end up with use-after-frees

3: Ensure that all position updates are invoked
prior to frame completion

Change-Id: Iedbc017f611ba2878a49b4586612f79249ca2fe3
(cherry picked from commit 7b570deea65bc7ac417a26ce3e4103bcef30e957)
2016-10-10 13:36:36 -07:00
sergeyv
5bb5626599 Turn off additional logging in text rendering
Change-Id: If5f11489c05e320e4436fb57680857b29228a755
b:30427106
2016-10-10 12:25:06 -07:00
Doris Liu
5ef10f1d26 Support calling start() in onAnimationFinished(...) in AVD am: 679fe6ab6f
am: 4a1ea9ba7e

Change-Id: If343048fcbe8e2af46b6cdfcd5953c0d5ffa6c4e
2016-10-08 23:56:52 +00:00
Doris Liu
4a1ea9ba7e Support calling start() in onAnimationFinished(...) in AVD
am: 679fe6ab6f

Change-Id: I2999f6fc543f56d73cd03fe74b466c033d6c7d1a
2016-10-08 23:52:20 +00:00
Doris Liu
679fe6ab6f Support calling start() in onAnimationFinished(...) in AVD
This CL fixed an issue where calling start() from onAnimationFinished()
caused AnimationListenerBridge::onAnimationFinished(...) to be unsafely
re-entered and the new start listener was (incorrectly) reset to null.

BUG: 31971397
Test: test apk in the bug linked above
Change-Id: Ica809ef2dab884950b93b54f2d0cb4b81e9830f1
2016-10-08 21:00:14 +00:00
Teng-Hui Zhu
6ff1730df5 Make umbra lighter when the blocker is too high and has no real umbra area. am: 9c555566bf
am: 9ad599930d

Change-Id: I930f1ea0a3620bfdb87e703bbdf927cdde7b809a
2016-10-06 21:37:17 +00:00
Teng-Hui Zhu
9ad599930d Make umbra lighter when the blocker is too high and has no real umbra area.
am: 9c555566bf

Change-Id: I785f5a25aae97f8852bb1cc4833f2662411eabc3
2016-10-06 21:06:36 +00:00
songjinshi
09901f3bc9 Fix thread race caused double free issue.
am: 5754b41c20

Change-Id: Ic9dd6e9c6d216753d997da99158816682d5464d1
2016-10-06 20:13:00 +00:00
Teng-Hui Zhu
9c555566bf Make umbra lighter when the blocker is too high and has no real umbra area.
b/31939390
Test: CTS testShadowLayout && Manual FrameworkShadow test

Change-Id: Ib0b6c4239ac8a521a827be246e912daf2ad3b885
2016-10-04 17:26:09 -07:00
Adam Lesinski
224ffd3cb2 Merge "[AssetManager]:Fix thread race caused double free issue." am: 126e022095 am: f48d0b8f19
am: 73b91c63ad

Change-Id: I27f5cc6106f0a8f0a58721e1e8ed836144347b6a
2016-10-03 20:26:41 +00:00
Adam Lesinski
73b91c63ad Merge "[AssetManager]:Fix thread race caused double free issue." am: 126e022095
am: f48d0b8f19

Change-Id: Ia7da9ff37d813729a8c916a3b6e378110045aa17
2016-10-03 20:21:46 +00:00
songjinshi
5754b41c20 Fix thread race caused double free issue.
The SharedZip's Asset is not thread-safety,the getResourceTableAsset()
and setResourceTableAsset(Asset* asset) function of the SharedZip is
not sync with a same lock.

Consider the following sequence of events:
Thread A calls setResourceTableAsset(Asset* asset),it will set
mResourceTableAsset = asset; then to calls getBuffer() of the asset.
Thread B calls getResourceTableAsset(),which return mResourceTableAsset,
then to calls getBuffer() of the mResourceTableAsset,the asset and
mResourceTableAsset is same one object.
Thread A to delete mZipInflater in getBuffer().
Thread B to delete mZipInflater in getBuffer().

It will cause crash becuase double delete mZipInflater in getBuffer().

https://code.google.com/p/android/issues/detail?id=211941

Bug:31734545
Change-Id: I5a7d67fdf64c4aa03f505b37a2fa840f4443d158
Signed-off-by: songjinshi <songjinshi@xiaomi.com>
2016-10-03 20:13:12 +00:00
Adam Lesinski
126e022095 Merge "[AssetManager]:Fix thread race caused double free issue." 2016-10-03 20:07:37 +00:00
Jakub Adamek
e60842aba3 Change name of overlay subdir property to sku.
am: c03d9483f0

Change-Id: I1368890b9c2dde2c5177473da3af0872c0c937a1
2016-10-03 10:30:14 +00:00
Jakub Adamek
c03d9483f0 Change name of overlay subdir property to sku.
Also move the SKU subdirectories directly under /vendor/overlay.

Bug: 31692079
Change-Id: I68c712b13918cc99629534580ee4f77d9e5b3823
2016-10-03 10:14:12 +01:00
ryang
44df10ebf7 Merge "hwui: Fix the length of partial updates system property" am: faf945a773 am: 73f2e9b812
am: 3734e98095

Change-Id: I88c1092a7fcce45d80bb2f5cd7d14b25e0660f40
2016-09-28 17:10:58 +00:00
ryang
3734e98095 Merge "hwui: Fix the length of partial updates system property" am: faf945a773
am: 73f2e9b812

Change-Id: Ibcc55a59fd29614e491843a0dbbcfd316f423312
2016-09-28 17:04:26 +00:00
Jakub Adamek
ff5cb98888 Search for runtime resource overlays in subdir.
am: 1c15c63578

Change-Id: Ie6614c07851a2365b623a455b2ccc85672d4c846
2016-09-28 10:27:41 +00:00
Jakub Adamek
1c15c63578 Search for runtime resource overlays in subdir.
See go/sku-colors. This changes the directory to search for framework
overlays if the right system property is defined. This allows
OEMs to specify different resources based on device SKUs.

Bug: 31692079
Change-Id: I9cb121b286b7f52aa26de1757fde1f3110cd47fd
2016-09-28 10:09:20 +01:00
ryang
647bc13709 hwui: Fix the length of partial updates system property
The maximum length of a system property is 31 bytes.
debug.hwui.enable_partial_updates is 33 bytes

Change-Id: Idb1b1a00294dd29f84530e8aee1f685094d0096f
2016-09-26 16:05:06 -04:00
songjinshi
49921f2c05 [AssetManager]:Fix thread race caused double free issue.
The SharedZip's Asset is not thread-safety,the getResourceTableAsset()
and setResourceTableAsset(Asset* asset) function of the SharedZip is
not sync with a same lock.

Consider the following sequence of events:
Thread A calls setResourceTableAsset(Asset* asset),it will set
mResourceTableAsset = asset; then to calls getBuffer() of the asset.
Thread B calls getResourceTableAsset(),which return mResourceTableAsset,
then to calls getBuffer() of the mResourceTableAsset,the asset and
mResourceTableAsset is same one object.
Thread A to delete mZipInflater in getBuffer().
Thread B to delete mZipInflater in getBuffer().

It will cause crash becuase double delete mZipInflater in getBuffer().

https://code.google.com/p/android/issues/detail?id=211941

Change-Id: I5a7d67fdf64c4aa03f505b37a2fa840f4443d158
Signed-off-by: songjinshi <songjinshi@xiaomi.com>
2016-09-20 01:31:19 +00:00
Yuqian Li
49d49fafb8 Ignore HasAlphaLayer flag to fix b/30929229 am: 83427ff222
am: df6b413b63

Change-Id: I994233a48472cd2d11acaa30673504b8589bc303
2016-09-15 14:02:15 +00:00
Yuqian Li
83427ff222 Ignore HasAlphaLayer flag to fix b/30929229
BUG:30929229
Change-Id: Iebadc6b3d224efa0554cbbb99ea43f871c28722b
2016-09-14 11:44:10 -04:00
sergeyv
0ec2fd7bc5 HWUI: track upload & recent usage in font cache am: af102bee51
am: 42c01cf62f

Change-Id: Ieb80108d520aa629c54a40d7c533bf74a71849c4
2016-09-13 02:01:28 +00:00
sergeyv
ee6aca55bd HWUI: calculate used memory in FontCache for gfxinfo am: baf29e7cf4
am: c60abfb739

Change-Id: I3f8202348a97c69d080b69329b23e388aec06f17
2016-09-13 01:59:39 +00:00
sergeyv
42c01cf62f HWUI: track upload & recent usage in font cache
am: af102bee51

Change-Id: I2c08fc8d81ce8e0a1442cb65cfec11c1981a1768
2016-09-13 01:54:15 +00:00
sergeyv
c60abfb739 HWUI: calculate used memory in FontCache for gfxinfo
am: baf29e7cf4

Change-Id: I0e100f38166f191552172bef640f73157c45b714
2016-09-13 01:53:08 +00:00
Sergei Vasilinetc
e3a9785386 Merge changes Ic26b25e7,I653571d6 into nyc-mr1-dev
* changes:
  HWUI: track upload & recent usage in font cache
  HWUI: calculate used memory in FontCache for gfxinfo
2016-09-13 01:41:12 +00:00
sergeyv
af102bee51 HWUI: track upload & recent usage in font cache
FontCacheHistoryTracker should be turned off before shipping: b/31438876

bug:30427106
Change-Id: Ic26b25e790d4ee69e484ca0cb23dc9cc522b2ed3
2016-09-12 15:45:26 -07:00
Vladislav Kaznacheev
23bb30843c Hold a weak reference to PointerController when handling vsync am: 33c5903e77
am: 8728a2fe53

Change-Id: Id131b973188298718a6f5423373af5bf54c8b18f
2016-09-09 19:42:04 +00:00
Vladislav Kaznacheev
8728a2fe53 Hold a weak reference to PointerController when handling vsync
am: 33c5903e77

Change-Id: If3e218dfdaa68953d184812884b7ed80ab16acfa
2016-09-09 19:34:21 +00:00
TreeHugger Robot
c1c0421f67 Merge "Hold a weak reference to PointerController when handling vsync" into nyc-mr1-dev 2016-09-09 19:28:10 +00:00
Vladislav Kaznacheev
33c5903e77 Hold a weak reference to PointerController when handling vsync
Currently PointerController starts listening to display events
immediately (in its constructor) and never explicitly removes
the callback. The reference dangling from the looper
prevents the PointerController instance from being deleted
when all the clients have released their references.

As a result, when USB or BT mouse is disconnected,
the mouse stays frozen on screen and only goes away
after a 15 sec inactivity timeout.

This change introduces an intermediary LooperCallback
which holds only a weak reference to PointerController.
The pointer now disappears immediately upon mouse
disconnect.

Bug: 30824220
Change-Id: I5f7208dbfa381b3e21f248cc0da402f307faa184
2016-09-09 10:03:31 -07:00
sergeyv
baf29e7cf4 HWUI: calculate used memory in FontCache for gfxinfo
bug:30427106
Change-Id: I653571d6a4e974e975fb0dc03fc2364eecbf2f84
2016-09-08 14:50:50 -07:00
John Reck
adde639da2 Fix EGLImage memory leak am: f8b0360298
am: 8714e02f6f

Change-Id: Ieaaaf8110cf48345d661389ef189454f3e3886dc
2016-09-02 17:53:50 +00:00
Chris Craik
b53c60876a Wait on frame work fences when frames are dropped am: 06e2e9cf4c
am: 7a14f5aeb9

Change-Id: I9f2159f2f5c8111df0c14e46cc5690cbfab9b7e9
2016-09-02 17:41:57 +00:00
John Reck
8714e02f6f Fix EGLImage memory leak
am: f8b0360298

Change-Id: Ibf8adad1b0fc66fe9de2bbd86d14b67ffe73efd0
2016-09-02 15:15:13 +00:00
John Reck
02913603bd Merge "Fix EGLImage memory leak" into nyc-mr1-dev 2016-09-02 15:07:25 +00:00
John Reck
f8b0360298 Fix EGLImage memory leak
Bug: 31247709
Change-Id: I9e36206b0d7bdb75b84cd53b70f7746ca34a3469
2016-09-01 14:10:20 -07:00
Chih-hung Hsieh
650615fb17 Merge "Fix google-explicit-constructor warnings." am: a6b6252d8b am: 1676161c1d
am: 316fa0aee7

Change-Id: I43d1cc625834092f12adec5ff52d1565d1b91e23
2016-09-01 17:56:12 +00:00
Chih-hung Hsieh
316fa0aee7 Merge "Fix google-explicit-constructor warnings." am: a6b6252d8b
am: 1676161c1d

Change-Id: Idf7b8caca19d0062955e3423c1420c7247a900bf
2016-09-01 17:49:58 +00:00
Chih-hung Hsieh
a6b6252d8b Merge "Fix google-explicit-constructor warnings." 2016-09-01 17:33:42 +00:00
Chris Craik
06e2e9cf4c Wait on frame work fences when frames are dropped
bug:30895941

Prevents a race where frame work could interleave between frames,
causing SurfaceView position updates to be delivered out of order.

Change-Id: I01e4cc557b69dcf33e877a0e16c0d115ec95e4cc
2016-08-31 17:32:47 -07:00
Chih-hung Hsieh
1f50f80aab Merge "Fix google-explicit-constructor warnings in libs/hwui." am: 7207562ff7 am: d7a69e04eb
am: 842f1e48e7

Change-Id: I401bb7ef3a46bb317ba664667fab4a16c129e5aa
2016-08-31 17:43:44 +00:00
Chih-hung Hsieh
842f1e48e7 Merge "Fix google-explicit-constructor warnings in libs/hwui." am: 7207562ff7
am: d7a69e04eb

Change-Id: I78ea5c2e7036c5d5c7f5573b4eef208b0ff93b99
2016-08-31 17:39:44 +00:00
Chih-Hung Hsieh
a619ec70cf Fix google-explicit-constructor warnings in libs/hwui.
* Add explicit keyword to conversion constructors,
  or add NOLINT for implicit converters.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: Id8ca42433a4fc3652e4cb13787c4cb169f20d9a9
2016-08-29 14:56:58 -07:00