7832 Commits

Author SHA1 Message Date
Tom Cherry
298a146754 Check for spurious wake ups
Condition::wait() can spuriously wake up, so we must guard it with
another check to ensure that a given wake was truly due to having
been signaled.

Bug: 34592766
Test: Boot bullhead
Change-Id: Iaa5a0ca6186aea50c51e2c402ef95d7ba861be92
2017-02-28 14:19:44 -08:00
Miao Wang
6addd61ff8 Remove uncessary dependency of libhwui
- libRS.so is not directly used. It is accessed by libRScpp.so.

Test: mm, and boot-up test on sailfish
Change-Id: I5742d2ee3b34ef09bcb997524408affce1ace8fd
(cherry picked from commit 629fd3d48ba1dbedc6e84e91a26f72fb1fba0e22)
2017-02-06 11:57:31 -08:00
Chris Craik
f772c047fa Add ShadowShaderAnimation benchmark DO NOT MERGE
Bug: 34809371
Test: manual

New benchmark uses several levels of overdraw from just shadows to benchmark
shadow shader performance.

Tessellation workload is minimal, due to simple rect caster shape.

Change-Id: I572476bd54e04566851f39027ada7254597b37f8
2017-02-03 11:45:47 -08:00
Mark Salyzyn
96bf5985d5 Replace cutils/log.h and log/logger.h with android/log.h or log/log.h
(part deux)

Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I7417936c4d3666608fccfe51a312c90ecefba2fb
2017-01-11 15:30:30 -08:00
Mark Salyzyn
e7fcbcb991 Merge "Replace cutils/log.h and log/logger.h with log/log.h" 2017-01-11 15:24:11 +00:00
John Reck
95ef9ec5b1 Merge "Fix a use-of-uninitialized-value warning." 2017-01-11 00:57:35 +00:00
George Burgess IV
a483173c78 Fix a use-of-uninitialized-value warning.
This warning was generated by the static analyzer:
warning: The left expression of the compound assignment is an
uninitialized value. The computed value will also be garbage
        *mDirtyMask |= animator->dirtyMask();

This can be fixed by initializing dirtyMask before using it in
AnimateFunctor.

Bug: None
Test: Static analyzer no longer complains about this.
Change-Id: I892749079cf93a012f1bed059a3f0c8bbaed9d7e
2017-01-10 15:33:57 -08:00
John Reck
1deac99c55 Support EGL_KHR_partial_update without EGL_EXT_buffer_age
Bug: 31334677
Test: manual && hwuimacro --onscreen partialdamage

Change-Id: I9b346b4053ec12c8a78a143a4dc0e708c44888a2
2017-01-09 14:35:37 -08:00
Mark Salyzyn
52eb4e01a4 Replace cutils/log.h and log/logger.h with log/log.h
Test: compile
Bug: 26552300
Bug: 31289077
Change-Id: I578b15b48f0fc2807a92abbc69a377c3d2191496
2017-01-09 14:31:34 -08:00
Colin Cross
19def9943a Move hwui private headers to frameworks/base/libs/hwui/private
hwui already exports most of its headers, move its private headers
into its source directory.

Bug: 33630870
Test: m -j native
Change-Id: I4968d5aaaa68d9e92c826841d20f29cef349c9d8
2016-12-14 13:35:40 -08:00
Colin Cross
3ac2be93a9 Convert libstorage to Android.bp
See build/soong/README.md for more information.

Test: m -j native
Change-Id: Ieb34d79af10e4e7cd146d0d40fd6946499dd1da0
2016-12-14 13:28:56 -08:00
Colin Cross
e78f853e46 Move libstorage includes into frameworks/base/lib/storage
Move the libstorage includes out of the global include path and into
frameworks/base/lib/storage/include, and export it.

Bug: 33630870
Test: m -j native
Change-Id: Idc0735360abc703496b9bc46d1a76ce8039af0d1
2016-12-14 13:28:46 -08:00
Colin Cross
9625912b7f Merge "Convert libandroidfw to Android.bp"
am: 46ec8dba83

Change-Id: I32a737c491eeb95ad080adacd47602ee814ba0cb
2016-12-03 04:14:58 +00:00
Jaekyun Seok
5705ad69db Merge "Remove static link in Android framework under /frameworks/base."
am: c60963e451

Change-Id: I0bbb3cf9a66752f6ee8218a4ac5545091130bbed
2016-12-02 19:35:03 +00:00
Colin Cross
ce2221e0ff Convert libandroidfw to Android.bp
See build/soong/README.md for more information.

Test: libandroidfw_tests
Merged-In: I4e575d62f724d5ffe43f12ff5642fb6799f7819e
Change-Id: I4e575d62f724d5ffe43f12ff5642fb6799f7819e
(cherry picked from commit 4f8d9e69eb63878a99abedfdc7b92c6284f30605)
2016-12-02 11:23:12 -08:00
Jaekyun Seok
377878b4d4 Remove static link in Android framework under /frameworks/base.
The dependencies to static libraries in frameworks should be removed
as many as possible to reduce a size of the system partition.
And that will improve coverage of the VNDK libraries because this
effort might find new necessary shared libs which were linked
statically before.

Size diffs of libs in /system/lib on angler-userdebug build are as
following.

libandroidfw.so      : 243748 -> 205196 (-38552)
libhwui.so           : 562028 -> 562580 (+552)
libmedia_jni.so      : 293652 -> 293656 (+4)
(All the others have the same size.)

total: (-37996)

Test: building succeeded, and the image was tested on angler.
Bug: 33056637
Change-Id: I3021fb438778eaea2be935b990ec85c4aec6c008
(cherry picked from commit 2b14c5eaf61635d1c3a69a2e59faa23cb6b7f7cb)
2016-12-01 10:31:12 +09:00
Wan He
530fdccbe4 Merge "Fix incorrect calculation of sizeof package structure"
am: 757e286cc8

Change-Id: Ia16ee8f4efaee3e43c656f753c878b13b4a4706c
2016-11-18 22:39:43 +00:00
Treehugger Robot
757e286cc8 Merge "Fix incorrect calculation of sizeof package structure" 2016-11-18 22:30:42 +00:00
John Reck
7269372d5f Merge "Avoid starving RT anims"
am: f77c220aa9

Change-Id: I3d4ba24ae0e6de4683d47163fd8f3bf65b98bd17
2016-11-18 00:14:05 +00:00
Treehugger Robot
f77c220aa9 Merge "Avoid starving RT anims" 2016-11-17 23:53:00 +00:00
John Reck
a5b7b89166 Avoid starving RT anims
Test: Manual, usleep(16000) in DrawFrameTask and tap
on recents

Merged-In: I88bb30a2503bc908ec45650c7d36b6fb3cc750d0

Change-Id: I88bb30a2503bc908ec45650c7d36b6fb3cc750d0
2016-11-17 22:05:22 +00:00
Wan He
3ff4226363 Fix incorrect calculation of sizeof package structure
Argument "package" is a pointer, not the structure.

Signed-off-by: Wan He <xiaolin.gxl@alibaba-inc.com>
2016-11-17 18:05:20 +08:00
Martijn Coenen
d03b17c29a Merge "Fix deprecated range_x calls."
am: 87cafe8f33

Change-Id: Idfbc4e3475cea7e56b3ac72afd61e1e981ef4e5d
2016-11-16 10:00:23 +00:00
Martijn Coenen
90213f341d Fix deprecated range_x calls.
Test: builds
Change-Id: I98412e51a54ef9f9e26c72ecd810dcea77aefdbb
2016-11-15 09:07:12 +01:00
Colin Cross
e81eb61399 Merge "Move one more libandroidfw header"
am: c5c74f9f49

Change-Id: Ib4d1c81aba13543da2454140548252cf013c95e1
2016-11-05 00:15:01 +00:00
Colin Cross
1d80addee4 Move one more libandroidfw header
The libandroidfw headers were moved into the library directory, move one
more that did not exist in the original patch.

Test: builds
Change-Id: Ic74a41558e1bc3984d98dd766f69d081edd8fc08
2016-11-04 15:49:43 -07:00
John Reck
946d11d216 Merge "Re-unite sources with their headers"
am: e43444a00b

Change-Id: I8f3ef6a1ddcf78d28f7444b6e83c552b8305fd8c
2016-11-04 21:47:34 +00:00
John Reck
03b5d506bc Re-unite sources with their headers
Move all the includes for androidfw under
a common base path for that library instead
of frameworks/base/includes.

Also fixes -Werror issues that resulted in
no longer being -isystem.

Test: builds
Change-Id: Ic4312eb61b197af114dded5691d5ae1ec82923f7
Merged-In: Ic4312eb61b197af114dded5691d5ae1ec82923f7
(cherry picked from commit f6113af2d6f6eebee68d3ac510fe96d38a7a39e9)
2016-11-04 13:27:37 -07:00
neo.chae
4720125a3c Merge "Fix idmap leak in zygote process"
am: f5ad44b60a

Change-Id: Ia9977c8166f797ad716284eda03076e282a9fde7
2016-11-02 21:16:33 +00:00
neo.chae
6a742a3850 Fix idmap leak in zygote process
Fix a idmap leak in AssetManager::addSystemOverlays.
And, The fix could also prevent fd leak of idmap.

Test: none

Change-Id: Iff8831e1951a1ca103821f64a612a8b28d2c14e7
Signed-off-by: Hyangseok Chae <neo.chae@lge.com>
2016-11-01 08:53:35 +09:00
George Burgess IV
1db1a86bba Merge "Fix static analyzer warnings."
am: ff5c3ad08b

Change-Id: I655fd765cfeae407c070261cfe07ce8b739b06fa
2016-10-18 01:43:24 +00:00
Treehugger Robot
ff5c3ad08b Merge "Fix static analyzer warnings." 2016-10-18 01:30:55 +00:00
Mark Salyzyn
6a8f0d70b0 Merge "missing includes"
am: 78929f3ee0

Change-Id: I3e7a25ded484d516fab453abe434c2e53cf0f27e
2016-10-17 21:25:59 +00:00
Mark Salyzyn
4d6c372eae missing includes
Assumptions are made about header side effects

Test: compile
Bug: 30465923
Change-Id: Icc9415aed5e54b2bc00b70aa0da6df4148f30654
2016-10-17 12:32:54 -07:00
George Burgess IV
e8efec56f0 Fix static analyzer warnings.
frameworks/base/libs/androidfw/ResourceTypes.cpp:742:46: warning: Result
of 'calloc' is converted to a pointer of type 'char16_t *', which is
incompatible with sizeof operand type 'char16_t **'
    mCache = (char16_t**)calloc(mHeader->stringCount,
        sizeof(char16_t**));

frameworks/base/libs/androidfw/ResourceTypes.cpp:4359:28: warning:
Potential leak of memory pointed to by 'set'
     return NO_MEMORY;

Bug: None
Test: Builds without the aforementioned warnings.
Change-Id: I1f84c1b9f4cba05f5cc7c3ae9fec1a07bc9cd8fe
2016-10-13 15:32:33 -07:00
Martin Wallgren
3970c44547 RRO: Synchronize access to overlays.list am: 0fbb608110
am: dce79f10ba

Change-Id: Idc121ffe64f1bc7b5bdcb1a800305165f27f1c0a
2016-10-12 21:09:42 +00:00
Doris Liu
1ef744a3b8 Fix SkShader leak for Gradient VectorDrawable and test am: fc9cf72339
am: c47199bb6a

Change-Id: I261f8f3708f526c15ae93c51d24bdaee054354f6
2016-10-12 21:03:14 +00:00
Martin Wallgren
dce79f10ba RRO: Synchronize access to overlays.list
am: 0fbb608110

Change-Id: I44a716df3954b6d2d58d7c9784f8b55cf041b10b
2016-10-12 21:03:11 +00:00
Doris Liu
c47199bb6a Fix SkShader leak for Gradient VectorDrawable and test
am: fc9cf72339

Change-Id: I493a8c52cd4cca79971a4fd2e3eed7f566ce8ecd
2016-10-12 20:56:55 +00:00
Martin Wallgren
0fbb608110 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.

Cherry-picked from AOSP.

Bug: 28032298
Test: manual
Change-Id: I51d39f121d207b11181340b68b164b60020f0c61
2016-10-12 14:56:31 +00:00
Adam Lesinski
78382db820 Merge "RRO: Synchronize access to overlays.list" 2016-10-12 14:52:49 +00:00
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