Commit Graph

3091 Commits

Author SHA1 Message Date
Elliott Hughes 485d373004 am f3f22e55: Merge "Add missing <unistd.h> include for close."
* commit 'f3f22e555bae8e362f3cac1efb289ca321266035':
  Add missing <unistd.h> include for close.
2015-02-20 01:13:29 +00:00
Elliott Hughes 14df3564fb Add missing <unistd.h> include for close.
Change-Id: Iebce6d74eecb8c275e800b7f47f74bbd4374860d
2015-02-19 16:58:44 -08:00
Michael Lentine f6303459d1 am a4201c10: am 592cc33c: am e86f7e96: am 3c0272ba: am dc2d031a: am da9fd70d: am 2758eb2e: am fde92eb0: Update maxNumber to be smaller.
* commit 'a4201c10aeb977a6e4e8c1bcb9ceca5ab591d0ad':
  Update maxNumber to be smaller.
2015-02-19 01:21:04 +00:00
Michael Lentine a4201c10ae am 592cc33c: am e86f7e96: am 3c0272ba: am dc2d031a: am da9fd70d: am 2758eb2e: am fde92eb0: Update maxNumber to be smaller.
* commit '592cc33c408d5c91ad87e1a51d72269d4525a10b':
  Update maxNumber to be smaller.
2015-02-19 01:06:53 +00:00
Michael Lentine 592cc33c40 am e86f7e96: am 3c0272ba: am dc2d031a: am da9fd70d: am 2758eb2e: am fde92eb0: Update maxNumber to be smaller.
* commit 'e86f7e96a75a7bf7bfa85d52cd9f2145fe25878c':
  Update maxNumber to be smaller.
2015-02-19 01:00:47 +00:00
Michael Lentine e86f7e96a7 am 3c0272ba: am dc2d031a: am da9fd70d: am 2758eb2e: am fde92eb0: Update maxNumber to be smaller.
* commit '3c0272ba8fbb98b5f1d45c52b1ae5292a8978e7d':
  Update maxNumber to be smaller.
2015-02-19 00:47:06 +00:00
Michael Lentine 3c0272ba8f am dc2d031a: am da9fd70d: am 2758eb2e: am fde92eb0: Update maxNumber to be smaller.
* commit 'dc2d031a7ee05725ad3d8cab4887d6c7a4063967':
  Update maxNumber to be smaller.
2015-02-19 00:32:42 +00:00
Michael Lentine dc2d031a7e am da9fd70d: am 2758eb2e: am fde92eb0: Update maxNumber to be smaller.
* commit 'da9fd70de125b0e6df4fb6285f538be9133c7b22':
  Update maxNumber to be smaller.
2015-02-19 00:25:34 +00:00
Michael Lentine da9fd70de1 am 2758eb2e: am fde92eb0: Update maxNumber to be smaller.
* commit '2758eb2e67d935cf1f04e3d713438c6ac7fe8b89':
  Update maxNumber to be smaller.
2015-02-19 00:15:40 +00:00
Michael Lentine 2758eb2e67 am fde92eb0: Update maxNumber to be smaller.
* commit 'fde92eb0ffcc37106d5fe85bf1f1ba30d8639d17':
  Update maxNumber to be smaller.
2015-02-19 00:10:11 +00:00
Michael Lentine fde92eb0ff Update maxNumber to be smaller.
There shouldn't be more than 4096 fds (probably signficantly smaller) and
there shouldn't be more than 4096 ints.

Bug: 18076253

Change-Id: I3a3e50ee3078a4710e9737114e65afc923ed0573
2015-02-18 10:34:37 -08:00
Nick Vaccaro fc35dd8bc9 am 26cc3d0b: am b9bb1f13: Merge "Add support for SENSOR_TYPE_WRIST_TILT_GESTURE" into lmp-mr1-modular-dev
* commit '26cc3d0b67ff4daf31eaeed0ecd87b391978aadb':
  Add support for SENSOR_TYPE_WRIST_TILT_GESTURE
2015-02-11 20:12:12 +00:00
Nick Vaccaro 26cc3d0b67 am b9bb1f13: Merge "Add support for SENSOR_TYPE_WRIST_TILT_GESTURE" into lmp-mr1-modular-dev
* commit 'b9bb1f139bd1cbf3b3faa002b509f3f0a167e20b':
  Add support for SENSOR_TYPE_WRIST_TILT_GESTURE
2015-02-11 20:04:42 +00:00
Nick Vaccaro 9bb99b1570 Add support for SENSOR_TYPE_WRIST_TILT_GESTURE
Change-Id: I7e5516de805618df41de0f9b06805002e32708c3
2015-02-07 00:09:05 +00:00
Ruben Brunk a27e2f7179 Merge "Add ProcessInfoService to activity manager." 2015-02-03 20:23:14 +00:00
Ruben Brunk 52f0407d68 Add ProcessInfoService to activity manager.
- Adds a new AIDL interface for querying process
  information from activity manager.

Bug: 19186859

Change-Id: Ic08858f346d6b66e7bfc9da6faa2c6e38d9b2e82
2015-02-02 14:56:55 -08:00
Lajos Molnar b3ca72ce1e CpuConsumer: fix build error 2015-01-29 10:55:21 -08:00
Chad Jones bacce71e40 Merge commit 'ec41d55b8d018f349f7687cfe491651db600b51d' 2015-01-29 10:32:25 -08:00
Chad Jones 1bca4eeba1 Merge commit '180c2ba763c32793c6d3c5fe2683f8f2b233ca10' 2015-01-29 10:32:02 -08:00
Lajos Molnar ec41d55b8d am 94ee9b59: Merge "CpuConsumer: lock buffers that could be YUV as ycbcr" into lmp-mr1-dev
* commit '94ee9b5916903e6ee23bb1ce8f688900a4eb6f65':
  CpuConsumer: lock buffers that could be YUV as ycbcr
2015-01-29 08:41:35 +00:00
Lajos Molnar 94ee9b5916 Merge "CpuConsumer: lock buffers that could be YUV as ycbcr" into lmp-mr1-dev 2015-01-29 07:53:58 +00:00
Lajos Molnar 180c2ba763 resolved conflicts for merge of 1f9f71e1 to lmp-mr1-dev-plus-aosp
Change-Id: I627e58fe738e9a3b9831508853f26f9adc350f90
2015-01-28 21:27:46 -08:00
Lajos Molnar 6a26be7c2b CpuConsumer: lock buffers that could be YUV as ycbcr
Bug: 17906609
Change-Id: Ic71af69ec3b19ab1224ed3ad5e0a97c60e81cda6
2015-01-28 16:52:43 -08:00
Lajos Molnar 1f9f71e183 GraphicBufferMapper: handle devices that do not implement lock_ycbcr
Bug: 19179927
Change-Id: I09ffca954fed3cd2d3466c8396627dc7dbc0052d
2015-01-28 16:26:36 -08:00
Yabin Cui 3d6c569140 am 39d890d9: am 6e32c037: Merge "Kill HAVE_PTHREADS."
* commit '39d890d9aed5cb07b8a166a749299b9d24d8f137':
  Kill HAVE_PTHREADS.
2015-01-27 23:42:55 +00:00
Yabin Cui 39d890d9ae am 6e32c037: Merge "Kill HAVE_PTHREADS."
* commit '6e32c0377db89bafa477715b3a02431d651978cf':
  Kill HAVE_PTHREADS.
2015-01-27 19:56:06 +00:00
Yabin Cui 8fb2d25ff3 Kill HAVE_PTHREADS.
Bug: 19083585
Change-Id: I355491de945590f43c82bdcb7968b01b4bff6e06
2015-01-26 22:36:36 -08:00
Dan Stoza 31bf9335ca am e18155e1: am 4ecf6ec9: Merge "Restore Region::set(uint32_t, uint32_t)"
* commit 'e18155e1c68a2ccd8ed2eb86b7c8c8481747ac0c':
  Restore Region::set(uint32_t, uint32_t)
2015-01-22 01:49:34 +00:00
Dan Stoza e18155e1c6 am 4ecf6ec9: Merge "Restore Region::set(uint32_t, uint32_t)"
* commit '4ecf6ec932644b680d5e13791275dd3bc1a1ee6d':
  Restore Region::set(uint32_t, uint32_t)
2015-01-22 00:13:22 +00:00
Dan Stoza 4ecf6ec932 Merge "Restore Region::set(uint32_t, uint32_t)" 2015-01-21 16:39:22 +00:00
Jeff Sharkey 1011032570 am 499127ea: am 8f3ade0c: Merge "Follow StrictMode refactoring."
* commit '499127eab812088ca24421b59ebfac6f47ea850f':
  Follow StrictMode refactoring.
2015-01-16 06:14:41 +00:00
Jeff Sharkey 499127eab8 am 8f3ade0c: Merge "Follow StrictMode refactoring."
* commit '8f3ade0c9ab52a1e4f13d6ff1922dd98e3ccdbcc':
  Follow StrictMode refactoring.
2015-01-16 06:07:31 +00:00
Riley Andrews a377321c61 am 15411a00: am aec92242: Merge "Replace all instances of intptr_t with uintptr_t."
* commit '15411a00e15ecb169b3ee8251aac01cfa4b4fb84':
  Replace all instances of intptr_t with uintptr_t.
2015-01-14 21:13:49 +00:00
Riley Andrews a7f0432a3b am d66ba520: am 41a160c4: Merge "Fix signed/unsigned comparison warnings in driver interface test."
* commit 'd66ba5209a8bb10abd7514544159a19fedd81e52':
  Fix signed/unsigned comparison warnings in driver interface test.
2015-01-14 21:13:48 +00:00
Jeff Sharkey 0c1f5cbb8a Follow StrictMode refactoring.
Bug: 18335678
Change-Id: Iea920cfa26b5ebfd77b4601c9e6e65b21599342a
2015-01-14 10:58:52 -08:00
Riley Andrews 15411a00e1 am aec92242: Merge "Replace all instances of intptr_t with uintptr_t."
* commit 'aec922426620804768f00a6c5cb902f278f2967f':
  Replace all instances of intptr_t with uintptr_t.
2015-01-13 23:26:02 +00:00
Riley Andrews d66ba5209a am 41a160c4: Merge "Fix signed/unsigned comparison warnings in driver interface test."
* commit '41a160c4cda1ef2c916028ec2d0801da738b5249':
  Fix signed/unsigned comparison warnings in driver interface test.
2015-01-13 23:26:01 +00:00
Riley Andrews 29d8cf91be Replace all instances of intptr_t with uintptr_t.
When compiling 32 bit binaries against a 64 bit binder interface,
implicit promotions of intptr_t types to uint64_t for fields in the
binder ioctl structures can result in invalid pointers because of sign
extension.
2015-01-13 21:59:44 +00:00
Riley Andrews 50bcb00a91 Fix signed/unsigned comparison warnings in driver interface test. 2015-01-12 18:20:49 -08:00
Bernhard Rosenkraenzer fe4966d59b Restore Region::set(uint32_t, uint32_t)
The Region::set(uint32_t,uint32_t) ABI is used by the Nexus 10 graphics
driver blobs.
After commit dd883c0b08, Nexus 10 blobs
need a rebuild unless the old ABI is added back

Change-Id: I138dcc1cc281b8d3cde0021282bf874054ec4eaf
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
2014-12-22 21:15:08 +01:00
Riley Andrews c872fa81c6 am 68047ffd: am 53186a4d: Merge "Add binder tests"
* commit '68047ffd4327bf5695ebf26833c3e2f40a3dfbd3':
  Add binder tests
2014-12-19 04:02:29 +00:00
Riley Andrews 7e21cad708 am bf247a3d: am dbd252ea: Merge "Add binder driver interface test"
* commit 'bf247a3d3797c2e729fd15b7a93913b24ce8ac72':
  Add binder driver interface test
2014-12-19 04:02:29 +00:00
Riley Andrews 68047ffd43 am 53186a4d: Merge "Add binder tests"
* commit '53186a4d78479ba21213b6e055c7a85faeb318e2':
  Add binder tests
2014-12-19 03:52:36 +00:00
Riley Andrews bf247a3d37 am dbd252ea: Merge "Add binder driver interface test"
* commit 'dbd252eab09d669a7d4b917890d75408193a85d3':
  Add binder driver interface test
2014-12-19 03:52:35 +00:00
Riley Andrews 06b01adcb8 Add binder tests
Change-Id: Ib0b38708dd6387fc4d5a4857ca74a217f3edad1a
2014-12-19 00:39:31 +00:00
Riley Andrews dc9b148985 Add binder driver interface test
Test ioctls and some binder commands without using libbinder.

Change-Id: I86dde56ff1380bca17d086021ac5324dc5210354
2014-12-19 00:38:27 +00:00
Andreas Gampe a21b7a0686 am b93bca5d: am a59d7a6a: Merge "GUI: Remove unused variables"
* commit 'b93bca5d0831068cd599f905ba43dc8334095d65':
  GUI: Remove unused variables
2014-12-09 23:48:51 +00:00
Andreas Gampe 80ea4e0373 am 5d11a72b: am 8fd567b1: Merge "Libui: Remove unused variables"
* commit '5d11a72bcd7d92ea0c0bf3959ed45380264f0495':
  Libui: Remove unused variables
2014-12-09 23:24:10 +00:00
Andreas Gampe b93bca5d08 am a59d7a6a: Merge "GUI: Remove unused variables"
* commit 'a59d7a6a66a2b8dcb2d00dbd6371fa89ae45ab04':
  GUI: Remove unused variables
2014-12-09 20:09:18 +00:00
Andreas Gampe 5d11a72bcd am 8fd567b1: Merge "Libui: Remove unused variables"
* commit '8fd567b127170a3962bc9de637eb7987cee71810':
  Libui: Remove unused variables
2014-12-09 11:25:32 +00:00
Andreas Gampe 7398a5af38 GUI: Remove unused variables
For build-system CFLAGS clean-up, remove unused variables.

Bug: 18632512
Change-Id: I79fdcf830683d7278f4bf114cfb76a26da1b88ff
2014-12-08 20:42:40 -08:00
Dan Stoza e22262ffd0 Merge "libgui: Enable -Weverything and -Werror" 2014-12-08 18:46:08 +00:00
Andreas Gampe ff78750c64 Libui: Remove unused variables
For build-system CFLAGS clean-up, remove unused variables.

Bug: 18632512
Change-Id: Ib78912ae442ddc6410960ab1efb4fb2faa1a9208
2014-12-05 20:52:16 -08:00
Dan Stoza dd883c0b08 libgui: Enable -Weverything and -Werror
Enables -Weverything and -Werror, with just a few exceptions for
warnings we can't (or shouldn't need to) work around.

This is a squashed commit based on an initial change with a couple of
fixes to avoid breaking certain targets. The source commits are:
  d723bd7669
  00d504c06e
  429ba89cd2

Change-Id: I034abec27bf4020d84af60d7acc1939c59986dd6
2014-12-05 14:59:29 -08:00
Dan Stoza 00d504c06e libgui: Only allow one return from useFenceSync
An #ifdef was causing multiple returns in this function, which was
triggering an unreachable code error on some build targets. This
adds an #else to ensure that only one return is exposed in any given
build.

Change-Id: I9ed7c3e769bc9094ad31d810944227d1d8302886
2014-12-05 13:43:03 -08:00
Michael Lentine ae33effd43 Fix crash when user provides large values in the Parcel.
Bug: 18102648
Change-Id: Ie6a24718e586a34424238363de80f9545951514f
(cherry-picked from commit 8afa1c4ab8)
2014-12-05 20:31:09 +00:00
Dan Stoza d723bd7669 libgui: Enable -Weverything and -Werror
Enables -Weverything and -Werror, with just a few exceptions for
warnings we can't (or shouldn't need to) work around.

Change-Id: I034abec27bf4020d84af60d7acc1939c59986dd6
2014-12-05 11:06:44 -08:00
Dan Albert 6efc505bd8 am 09b9193d: Merge "Fix -Werror on 64-bit builds"
* commit '09b9193d10b3849e426c5370a757a0eedc65a7ff':
  Fix -Werror on 64-bit builds
2014-12-05 18:01:50 +00:00
Dan Albert bcf7f22102 am 67df03d0: Merge "Disable struct padding warning/error"
* commit '67df03d054f0cc4bd0e47066642b791198e9b0ad':
  Disable struct padding warning/error
2014-12-05 18:01:49 +00:00
Dan Albert bb37153577 am 35df7531: Merge "libui: Enable -Weverything and -Werror"
* commit '35df753169397d9b647b251446af7093e237d047':
  libui: Enable -Weverything and -Werror
2014-12-05 18:01:49 +00:00
Dan Albert 7530114619 am 5588d900: Merge "Enable clang for libui/libgui/surfaceflinger"
* commit '5588d9000cd1ef217185c9001d6b5ecd84db9741':
  Enable clang for libui/libgui/surfaceflinger
2014-12-05 18:01:48 +00:00
Dan Stoza 133caacf87 Fix -Werror on 64-bit builds
Add another static_cast to avoid an error on 64-bit builds

Change-Id: I62fb2c67766c4aab70d9d1834f255d06ff82dd8d
(cherry picked from commit 116c7a113c)
2014-12-04 18:06:48 -08:00
Dan Stoza 42af278173 Disable struct padding warning/error
Adds -Wno-padded, which was triggering on 64-bit devices

Change-Id: If27bac27881f2081a222b32213901f5087554b07
(cherry picked from commit 4e84bd310c)
2014-12-04 18:06:48 -08:00
Dan Stoza d318240042 libui: Enable -Weverything and -Werror
Enables -Weverything and -Werror, with just a few exceptions for
warnings we can't (or shouldn't need to) work around.

Change-Id: I470a267e9b1c373f2d5c960f005c3b0e02b2db63
(cherry picked from commit 303b9a5123)
2014-12-04 17:56:27 -08:00
Dan Stoza 01049c8321 Enable clang for libui/libgui/surfaceflinger
Enables clang and C++11 for libui/libgui/surfaceflinger, and
eliminates all compile-time warnings.

Change-Id: Ie237fdb5ae44f2bfcddaa884f9c65ec3f08ae50f
(cherry picked from commit f10c46ef85)
2014-12-04 17:56:17 -08:00
Michael Lentine 3880326857 Fix for corruption when numFds or numInts is too large.
Bug: 18076253
Change-Id: I4c5935440013fc755e1d123049290383f4659fb6
(cherry picked from commit dfd06b89a4)
2014-12-04 17:49:31 -08:00
Michael Lentine 784fd39a19 resolved conflicts for merge of d6308379 to lmp-dev
Change-Id: I92ed61b6fdfe458cf5f8bfd6f0b37ff736280500
2014-12-02 11:15:56 -08:00
Michael Lentine d6308379d9 am 76ebd319: am 3d89edca: am e6f7a44e: Fix for corruption when numFds or numInts is too large.
* commit '76ebd319d96494049a2a598f4449c0ec417220f6':
  Fix for corruption when numFds or numInts is too large.
2014-12-02 18:04:09 +00:00
Michael Lentine 76ebd319d9 am 3d89edca: am e6f7a44e: Fix for corruption when numFds or numInts is too large.
* commit '3d89edca65e07319c9ac3b9bb9889e80e8c40578':
  Fix for corruption when numFds or numInts is too large.
2014-12-02 17:52:00 +00:00
Michael Lentine 3d89edca65 am e6f7a44e: Fix for corruption when numFds or numInts is too large.
* commit 'e6f7a44e835d320593fa33052f35ea52948ff0b2':
  Fix for corruption when numFds or numInts is too large.
2014-12-02 17:45:44 +00:00
Dan Stoza 116c7a113c Fix -Werror on 64-bit builds
Add another static_cast to avoid an error on 64-bit builds

Change-Id: I62fb2c67766c4aab70d9d1834f255d06ff82dd8d
2014-12-01 15:15:31 -08:00
Dan Stoza 4e84bd310c Disable struct padding warning/error
Adds -Wno-padded, which was triggering on 64-bit devices

Change-Id: If27bac27881f2081a222b32213901f5087554b07
2014-12-01 15:03:34 -08:00
Dan Stoza 303b9a5123 libui: Enable -Weverything and -Werror
Enables -Weverything and -Werror, with just a few exceptions for
warnings we can't (or shouldn't need to) work around.

Change-Id: I470a267e9b1c373f2d5c960f005c3b0e02b2db63
2014-12-01 11:43:52 -08:00
Dan Stoza 456d35b34f am e4ea03f7: am 80e81505: Merge "binder: Add {read,write}Uint32 methods to Parcel"
* commit 'e4ea03f74ded76f588501bd2e90ecb767c6426b3':
  binder: Add {read,write}Uint32 methods to Parcel
2014-12-01 19:29:12 +00:00
Dan Stoza b01eea0a58 am 32ad1d51: am 104e1259: Merge "binder: Return pid_t/uid_t instead of int"
* commit '32ad1d518b8e89b487c8da2f6ec29c9a30ee5529':
  binder: Return pid_t/uid_t instead of int
2014-12-01 19:29:11 +00:00
Dan Stoza e4ea03f74d am 80e81505: Merge "binder: Add {read,write}Uint32 methods to Parcel"
* commit '80e8150549c9d8380dadf942336d41ab3d92bf78':
  binder: Add {read,write}Uint32 methods to Parcel
2014-12-01 19:27:00 +00:00
Dan Stoza 32ad1d518b am 104e1259: Merge "binder: Return pid_t/uid_t instead of int"
* commit '104e12594e085bc8dd32eedb96643b774b1508a0':
  binder: Return pid_t/uid_t instead of int
2014-12-01 19:23:22 +00:00
Dan Stoza 41a0f2f86c binder: Add {read,write}Uint32 methods to Parcel
Adds readUint32 and writeUint32 methods to the Parcel class. This
saves a lot of static_casting in anything implementing a Binder
interface on the native side.

Change-Id: Iafc73b0633654a3a4c49767f41806b56906c924f
2014-12-01 11:13:11 -08:00
Dan Stoza 9c634fd2d1 binder: Return pid_t/uid_t instead of int
Makes IPCThreadState::getCalling{Pid,Uid} return a more
appropriate type.

Change-Id: I97f8a83c1c0722bc1afbf8a6df1a288f8f1f0d2c
2014-12-01 11:07:14 -08:00
Chih-hung Hsieh 627086c2ef am a7c75d1b: am 2d7ec9d7: Merge "Fix build with clang in C++11 mode"
* commit 'a7c75d1b17556d9842a7823c94a2c96982687c63':
  Fix build with clang in C++11 mode
2014-11-25 23:01:13 +00:00
Chih-hung Hsieh a7c75d1b17 am 2d7ec9d7: Merge "Fix build with clang in C++11 mode"
* commit '2d7ec9d7b5dfdb93930b94c134fa2dc10fd27313':
  Fix build with clang in C++11 mode
2014-11-25 22:56:02 +00:00
Bernhard Rosenkränzer 74debb0b8f Fix build with clang in C++11 mode
Now that we're in C++11 mode by default, clang complains about switch
statements with case values not matching the type -- since some
binder_driver_return_protocol values are > 0x7fffffff, we need to make
the switch statements operate on uint32_t rather than int32_t.

BUG: 18466763
Change-Id: Iedbfd5c7a3d3d9f087d2eab4ff21343ad7a2a448
Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
2014-11-25 14:06:04 -08:00
Andreas Gampe b54d73d972 am 09efe0ac: am 2e42a906: Merge "Binder: Remove unused functions & variables"
* commit '09efe0ac2a0f34eb951c9a2b91b2d15e3ab7b7ca':
  Binder: Remove unused functions & variables
2014-11-25 19:56:30 +00:00
Andreas Gampe 09efe0ac2a am 2e42a906: Merge "Binder: Remove unused functions & variables"
* commit '2e42a90653abd0fc8a76909b5f101782d187136e':
  Binder: Remove unused functions & variables
2014-11-25 18:52:24 +00:00
Andreas Gampe 0b53b5c0b3 Binder: Remove unused functions & variables
For build-system CFLAGS clean-up, remove unused functions and
variables.

Change-Id: I88abc2bc99e6b91c7aa56470ff9671bf8bf29f8d
2014-11-24 11:39:11 -08:00
Elliott Hughes 7a6037e914 am f167968b: am e0f91c37: Merge "We HAVE_LITTLE_ENDIAN."
* commit 'f167968b4667df017958a653f74c60831faf5ad8':
  We HAVE_LITTLE_ENDIAN.
2014-11-22 08:04:43 +00:00
Elliott Hughes f167968b46 am e0f91c37: Merge "We HAVE_LITTLE_ENDIAN."
* commit 'e0f91c3731b16b010eb31117e941e5468bdfeb2e':
  We HAVE_LITTLE_ENDIAN.
2014-11-22 08:01:17 +00:00
Elliott Hughes a5d7459936 We HAVE_LITTLE_ENDIAN.
Change-Id: I68551ad663f2649a06b1958e9bef152e6d026e72
2014-11-21 23:35:36 -08:00
Michael Lentine e6f7a44e83 Fix for corruption when numFds or numInts is too large.
Bug: 18076253
Change-Id: I4c5935440013fc755e1d123049290383f4659fb6
2014-11-21 17:18:59 -08:00
Dan Albert 325c4c9aa7 resolved conflicts for merge of c1ced8bb to master
Change-Id: I83db00ff986ace8a1c77648738b93124613ddfc0
2014-11-20 15:16:22 -08:00
Dan Albert c1ced8bbcd am c894c204: Merge "C++11 compatibility."
* commit 'c894c2045f589571c80af0648e7a9dcd7e97b6a8':
  C++11 compatibility.
2014-11-20 23:00:48 +00:00
Dan Albert 3bdc5b8268 C++11 compatibility.
* Explicit conversion for atomic_uintptr_t initialization.
 * Fix string literal concatenation to not be a UD literal.
 * Use __typeof__ instead of typeof (should become decltype once this
   actually moves to C++11).

Bug: 18466763
Change-Id: I4eedddfb945a2a703ed27317cb6e2b3041b1ebfc
2014-11-20 21:04:35 +00:00
Marco Nelissen e12cfc23b2 am 55f71bc0: Merge "Replace IInterface::asBinder() with a static"
* commit '55f71bc0800b9ec7a779c5d30d5a90e074c2526b':
  Replace IInterface::asBinder() with a static
2014-11-17 18:52:56 +00:00
Marco Nelissen 097ca275f4 Replace IInterface::asBinder() with a static
so we can do NULL checks again, and update calls to IInterface::asBinder()
to use the new static version.

Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
2014-11-17 08:47:01 -08:00
Marco Nelissen 2ea926bda2 Replace IInterface::asBinder() with a static
so we can do NULL checks again, and update calls to IInterface::asBinder()
to use the new static version.

Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
2014-11-14 14:01:29 -08:00
Dianne Hackborn abd62d66ef am 1f3ac8b4: am a4cff88d: Fix issue #18356768: some app process may hang at Runtime#exit...
* commit '1f3ac8b42ff784930d8194b75d33aef1098a8231':
  Fix issue #18356768: some app process may hang at Runtime#exit...
2014-11-14 19:18:26 +00:00
Dianne Hackborn 1f3ac8b42f am a4cff88d: Fix issue #18356768: some app process may hang at Runtime#exit...
* commit 'a4cff88d80bf1acbdbd063af88ecad83a8b9b7b4':
  Fix issue #18356768: some app process may hang at Runtime#exit...
2014-11-14 01:43:31 +00:00
Dianne Hackborn a4cff88d80 Fix issue #18356768: some app process may hang at Runtime#exit...
...in Parcel destructor

Don't use a Mutux object, just use simple posix mutex primitives,
to avoid static init/destroy order problems.

Change-Id: Ic012d94297564c0a55d58869f8276d7d10545fbc
2014-11-13 17:09:59 -08:00
Dan Stoza d26b17a137 Merge "Enable clang for libui/libgui/surfaceflinger" 2014-11-12 20:14:29 +00:00
Dianne Hackborn 00326f6409 am ba2e1a33: am ca69e8f2: Merge "Add tracking of parcel memory allocations." into lmp-mr1-dev
* commit 'ba2e1a332eb24fcf4eef3634b8233d1681fd1309':
  Add tracking of parcel memory allocations.
2014-11-12 16:36:49 +00:00
Dianne Hackborn ba2e1a332e am ca69e8f2: Merge "Add tracking of parcel memory allocations." into lmp-mr1-dev
* commit 'ca69e8f2d0a1fc963bd170f9b2bf164028761323':
  Add tracking of parcel memory allocations.
2014-11-12 03:51:05 +00:00
Dianne Hackborn 7e790af756 Add tracking of parcel memory allocations.
Change-Id: I76ffed0e69ccfe70e87d98646f11d4de7c3fd980
2014-11-11 16:23:04 -08:00
Dan Stoza f10c46ef85 Enable clang for libui/libgui/surfaceflinger
Enables clang and C++11 for libui/libgui/surfaceflinger, and
eliminates all compile-time warnings.

Change-Id: Ie237fdb5ae44f2bfcddaa884f9c65ec3f08ae50f
2014-11-11 14:28:22 -08:00
Dan Stoza 6b7a45859e am 8e624d4c: am 98d20f82: Merge "Add a BufferItem parameter to onFrameAvailable" into lmp-mr1-dev
* commit '8e624d4cad45532c09879356f3adaa3b65fdcfc9':
  Add a BufferItem parameter to onFrameAvailable
2014-11-07 20:09:39 +00:00
Dan Stoza 8e624d4cad am 98d20f82: Merge "Add a BufferItem parameter to onFrameAvailable" into lmp-mr1-dev
* commit '98d20f82ca8979b30c81df9639f54ab11e1951f9':
  Add a BufferItem parameter to onFrameAvailable
2014-11-07 20:03:42 +00:00
Dan Stoza 98d20f82ca Merge "Add a BufferItem parameter to onFrameAvailable" into lmp-mr1-dev 2014-11-07 19:44:31 +00:00
Dan Stoza 8dc55396fc Add a BufferItem parameter to onFrameAvailable
Passes the BufferItem for the queued buffer to the onFrameAvailable
callback so the consumer can track the BufferQueue's contents. Also
adds an onFrameReplaced callback, which is necessary if the consumer
wants to do anything more than simple queue length tracking.

Bug: 18111837
Change-Id: If9d07229c9b586c668e5f99074e9b63b0468feb0
2014-11-07 10:39:13 -08:00
Dan Albert cad831fb15 am c6f93a43: Merge "Add missing include to fix libc++ build."
* commit 'c6f93a43d636b0ad16b75adf664c6a33d30b39dd':
  Add missing include to fix libc++ build.
2014-11-07 18:37:43 +00:00
Dan Albert 0d1c700214 Add missing include to fix libc++ build.
This was previously committed, but I guess it got lost in the merge
queue.

Bug: 15193147
Change-Id: Ic0e5d90ab403fb833d6a3bb7c55d279c56534869
2014-11-07 09:33:44 -08:00
Michael Lentine 585cccc7ff am a2f27a0d: am 26645298: Merge "Fix for corruption when numFds or numInts is too large." into lmp-mr1-dev
* commit 'a2f27a0d63da87b23bf214355882bbcea6a163ea':
  Fix for corruption when numFds or numInts is too large.
2014-11-05 20:11:32 +00:00
Michael Lentine a2f27a0d63 am 26645298: Merge "Fix for corruption when numFds or numInts is too large." into lmp-mr1-dev
* commit '26645298400c0ae3a95731388364263d6a914ee4':
  Fix for corruption when numFds or numInts is too large.
2014-11-05 19:06:19 +00:00
Michael Lentine 2664529840 Merge "Fix for corruption when numFds or numInts is too large." into lmp-mr1-dev 2014-11-05 18:58:22 +00:00
Dan Albert c954a121e1 Add a missing include.
Was being included transitively by stlport.

Bug: 15193147
Change-Id: If462e5ddcf4a620367fb4b5533f44960fd3b7378
2014-11-04 22:31:05 -08:00
Jesse Hall 6eb6b9fd8c am 06ce1094: am fee99040: Revert "Add more logging for dup(fd) failure"
* commit '06ce1094706bb0856f6cc876e1f5276adc642446':
  Revert "Add more logging for dup(fd) failure"
2014-11-04 17:40:28 +00:00
Jesse Hall eab3e59f8b am 88361aaa: am 8e5cf83a: Revert "Parcel: extra validation/debug code for writeDupFileDescriptor"
* commit '88361aaaf4f2339f50dc32438a261283c642d471':
  Revert "Parcel: extra validation/debug code for writeDupFileDescriptor"
2014-11-04 17:40:27 +00:00
Jesse Hall 06ce109470 am fee99040: Revert "Add more logging for dup(fd) failure"
* commit 'fee99040de000a64f6036a7db172fb7c68d9764a':
  Revert "Add more logging for dup(fd) failure"
2014-11-04 17:35:23 +00:00
Jesse Hall 88361aaaf4 am 8e5cf83a: Revert "Parcel: extra validation/debug code for writeDupFileDescriptor"
* commit '8e5cf83afbe2b671f96d04786cf0d0f967e342f9':
  Revert "Parcel: extra validation/debug code for writeDupFileDescriptor"
2014-11-04 17:35:23 +00:00
Jesse Hall aa4ccfd123 am de288fe2: Revert "bufferqueue: workaround: allow NULL fence with queueBuffer"
* commit 'de288fe2d43adfa1b2243ae534faaf832bf50491':
  Revert "bufferqueue: workaround: allow NULL fence with queueBuffer"
2014-11-04 17:35:22 +00:00
Jesse Hall fee99040de Revert "Add more logging for dup(fd) failure"
Underlying bug has been fixed, extra debug code no longer needed

This reverts commit 36273c991b.

Change-Id: Ia47f1ae9ee7338329bfb8d710aff57e15e944f20
2014-11-04 08:48:16 -08:00
Jesse Hall 8e5cf83afb Revert "Parcel: extra validation/debug code for writeDupFileDescriptor"
Underlying bug has been fixed, extra debug code no longer needed.

This reverts commit ccf851f108.

Change-Id: I19ad9239efdf1d8f70cd74af9b7c2ae97713208f
2014-11-04 08:47:57 -08:00
Jesse Hall de288fe2d4 Revert "bufferqueue: workaround: allow NULL fence with queueBuffer"
Underlying bug has been fixed, workaround no longer needed

This reverts commit 5b0cbcf946.

Change-Id: Ic9532b407d1291a7780a12a75aaa117ae4aa9fcb
2014-11-04 08:47:37 -08:00
Chih-Hung Hsieh 4c1482acb1 am 923b0f6a: am ac5cd96f: am dbab409c: Merge "Avoid two warnings from clang."
* commit '923b0f6a6787462509c23349ac04b8e9360c51cc':
  Avoid two warnings from clang.
2014-11-04 02:09:30 +00:00
Chih-Hung Hsieh 923b0f6a67 am ac5cd96f: am dbab409c: Merge "Avoid two warnings from clang."
* commit 'ac5cd96fe24690d9e0ae823c77334b8579139aa2':
  Avoid two warnings from clang.
2014-11-04 01:58:17 +00:00
Chih-Hung Hsieh ac5cd96fe2 am dbab409c: Merge "Avoid two warnings from clang."
* commit 'dbab409c49ca5dd6686912d0b3eeb19ef1c37a3e':
  Avoid two warnings from clang.
2014-11-04 01:24:07 +00:00
Michael Lentine dfd06b89a4 Fix for corruption when numFds or numInts is too large.
Bug: 18076253
Change-Id: I4c5935440013fc755e1d123049290383f4659fb6
2014-11-03 14:08:54 -08:00
Michael Lentine 001ed44536 am 54430ca2: am 793fc0e1: Merge "Fix crash when user provides large values in the Parcel." into lmp-mr1-dev
* commit '54430ca2a88f57c709ea2924ea0b78820ae62643':
  Fix crash when user provides large values in the Parcel.
2014-11-01 00:41:16 +00:00
Michael Lentine 54430ca2a8 am 793fc0e1: Merge "Fix crash when user provides large values in the Parcel." into lmp-mr1-dev
* commit '793fc0e13d25bdecda1219999f8be2cb3c121d20':
  Fix crash when user provides large values in the Parcel.
2014-11-01 00:33:29 +00:00
Michael Lentine 8afa1c4ab8 Fix crash when user provides large values in the Parcel.
Bug: 18102648
Change-Id: Ie6a24718e586a34424238363de80f9545951514f
2014-10-31 16:08:44 -07:00
Michael Lentine fb66335bcc am 078794ed: am 98536859: Merge "Fix output of pointers for 64bit devices." into lmp-mr1-dev
* commit '078794ed377e7080ee155a632482bb98f1c9ade7':
  Fix output of pointers for 64bit devices.
2014-10-31 23:07:01 +00:00
Michael Lentine 078794ed37 am 98536859: Merge "Fix output of pointers for 64bit devices." into lmp-mr1-dev
* commit '9853685931298ba02066ebb50a8377ad4aa80f00':
  Fix output of pointers for 64bit devices.
2014-10-31 22:58:19 +00:00
Chih-Hung Hsieh 8e5337de2c Avoid two warnings from clang.
Clang compiler warns about undefined static functions like getReturnString
before all references are removed inside IF_LOG_COMMANDS.
To remove such warnings, we can leave those static functions defined
and the compiler will remove them at the end when they are not used.

Add a cast to long before converting from int to void*,
to avoid type cast warnings on 64 bit targets.

BUG: 17043248
Change-Id: Ica31101522279d2c8eacc90e2939767002fb827b
2014-10-31 18:38:00 +00:00
Michael Lentine fae12d4fb4 Fix output of pointers for 64bit devices.
Change-Id: I279c1cf8d4c126b98f4a92ca807ade3749d01ff0
2014-10-31 11:08:19 -07:00
Jesse Hall f12f15502a am 1834f8ea: GLConsumer: correct EGL_NO_DISPLAY to EGL_NO_CONTEXT
* commit '1834f8ea975e9a882b44dc479320fe02e306e630':
  GLConsumer: correct EGL_NO_DISPLAY to EGL_NO_CONTEXT
2014-10-30 20:58:43 +00:00
Jesse Hall 1834f8ea97 GLConsumer: correct EGL_NO_DISPLAY to EGL_NO_CONTEXT
Change-Id: I4dcb57a0db9ee3c5222cd453c9213859384212b0
(cherry picked from commit 46a1f6b40e)
2014-10-29 17:15:09 +00:00
Michael Lentine 2bb7270783 am 15b2ecf5: am dcc959be: Merge "Adding eglInitialize and eglTerminate image creation and deletion." into lmp-mr1-dev
* commit '15b2ecf599414c86cb198f3ffc126b50f88b5aa0':
  Adding eglInitialize and eglTerminate image creation and deletion.
2014-10-21 18:43:47 +00:00
Michael Lentine 15b2ecf599 am dcc959be: Merge "Adding eglInitialize and eglTerminate image creation and deletion." into lmp-mr1-dev
* commit 'dcc959beb77099d319a94e3985da2f4ea4064e7b':
  Adding eglInitialize and eglTerminate image creation and deletion.
2014-10-21 18:35:24 +00:00
Michael Lentine dcc959beb7 Merge "Adding eglInitialize and eglTerminate image creation and deletion." into lmp-mr1-dev 2014-10-21 18:20:45 +00:00
Jesse Hall 937052fb1c am a069e853: am 649bafb7: Merge "bufferqueue: workaround: allow NULL fence with queueBuffer (DO NOT MERGE)" into lmp-dev
* commit 'a069e8532ba272ac5b935e332e426a3dacf827fc':
  bufferqueue: workaround: allow NULL fence with queueBuffer (DO NOT MERGE)
2014-10-20 14:31:38 +00:00
Jesse Hall a069e8532b am 649bafb7: Merge "bufferqueue: workaround: allow NULL fence with queueBuffer (DO NOT MERGE)" into lmp-dev
* commit '649bafb7ba2c3204295bc3451ff7af7e28e714ed':
  bufferqueue: workaround: allow NULL fence with queueBuffer (DO NOT MERGE)
2014-10-20 14:17:18 +00:00
Jesse Hall f35a5ba664 am 649bafb7: Merge "bufferqueue: workaround: allow NULL fence with queueBuffer (DO NOT MERGE)" into lmp-dev
* commit '649bafb7ba2c3204295bc3451ff7af7e28e714ed':
  bufferqueue: workaround: allow NULL fence with queueBuffer (DO NOT MERGE)
2014-10-20 14:13:05 +00:00
Jesse Hall 5b0cbcf946 bufferqueue: workaround: allow NULL fence with queueBuffer (DO NOT MERGE)
On one device there is a bug, not yet root-caused, that causes fence
fds to not make it across binder from producer to consumer in the
IGraphicBufferProducer::queueBuffer call. Rather than returning an
error, which the producer typically treats as a fatal error, this
change allows the buffer to be queued with no fence. This avoids an
application crash at the risk of (likely single-frame) visible
corruption.

Bug: 17946343
Change-Id: I9ca89f94098c455e1e90f5f58d5336c936b04a9c
2014-10-19 04:57:10 +00:00
Dan Albert 0e978be998 am 3235d8e4: am c52e54c4: Merge "Some more test cleanup."
* commit '3235d8e477e1a0ad72d22acfff7d9966f882daa6':
  Some more test cleanup.
2014-10-17 17:57:51 +00:00
Dan Albert 3235d8e477 am c52e54c4: Merge "Some more test cleanup."
* commit 'c52e54c47184704613d446eb15d051ceb43d82b3':
  Some more test cleanup.
2014-10-17 17:53:10 +00:00
Dan Albert 55833709ab am c52e54c4: Merge "Some more test cleanup."
* commit 'c52e54c47184704613d446eb15d051ceb43d82b3':
  Some more test cleanup.
2014-10-17 17:53:05 +00:00
Dan Albert ed7d193ae9 Some more test cleanup.
Needed to build successfully when libc++ is the default STL.

Also fix a missing include. Not sure how this was getting by before.
Probably some transitive include.

Change-Id: Ie96b79e96b4e154d786fbf2d5ae5cf5892608837
2014-10-16 20:46:05 -07:00
Dan Albert fad2e3abf0 am 27b780b5: am 9cc84950: Merge "Don\'t check if this == NULL."
* commit '27b780b517eb18582f978da64febb31ecfa8e4bf':
  Don't check if this == NULL.
2014-10-15 22:57:13 +00:00
Dan Albert 27b780b517 am 9cc84950: Merge "Don\'t check if this == NULL."
* commit '9cc849500df0bba42d3ed19b90c38ff1dffd2262':
  Don't check if this == NULL.
2014-10-15 22:52:51 +00:00
Dan Albert 759115cd6d am 9cc84950: Merge "Don\'t check if this == NULL."
* commit '9cc849500df0bba42d3ed19b90c38ff1dffd2262':
  Don't check if this == NULL.
2014-10-15 22:52:43 +00:00
Dan Albert 9cc849500d Merge "Don't check if this == NULL." 2014-10-15 22:45:07 +00:00
Narayan Kamath 25c5d725f0 am 328f9c25: am 16410d45: am 9ea09757: Fix broken error check in Parcel::readBlob
* commit '328f9c259ba9d3586a2496d887a96b610d112b7b':
  Fix broken error check in Parcel::readBlob
2014-10-10 18:42:19 +00:00
Narayan Kamath 328f9c259b am 16410d45: am 9ea09757: Fix broken error check in Parcel::readBlob
* commit '16410d458fdf9915dc8cb82b1bae3949a8100124':
  Fix broken error check in Parcel::readBlob
2014-10-10 17:00:18 +00:00
Narayan Kamath 16410d458f am 9ea09757: Fix broken error check in Parcel::readBlob
* commit '9ea09757fa63ad2a9bea9c846b51c1210d69c79f':
  Fix broken error check in Parcel::readBlob
2014-10-09 19:17:44 +00:00
Michael Lentine 78be65e7bf Adding eglInitialize and eglTerminate image creation and deletion.
Previously it was possible to have the driver's eglTerminate called beofre
eglDestroyImageKHR in GLConsumer. This was because we didn't increment the
refcount for the lifetime of the image. This could lead to a crash or a deadlock
when multiple threads called terminate and destroy simultaneously.

Bug: 17700483
Change-Id: I7010d0f1b3db875332e95630b5e098a5564ba755
2014-10-09 10:26:37 -07:00
Narayan Kamath 4335d35c71 am 9ea09757: Fix broken error check in Parcel::readBlob
* commit '9ea09757fa63ad2a9bea9c846b51c1210d69c79f':
  Fix broken error check in Parcel::readBlob
2014-10-09 12:50:12 +00:00
Jesse Hall 3dbf96cf06 am 20fca75f: am b7702c5c: Merge "BufferQueueProducer: Throttle EGL frame production." into lmp-mr1-dev
* commit '20fca75fbd9141ebae6c9a28f5c09a837eb9caad':
  BufferQueueProducer: Throttle EGL frame production.
2014-10-08 17:04:38 +00:00
Jesse Hall 20fca75fbd am b7702c5c: Merge "BufferQueueProducer: Throttle EGL frame production." into lmp-mr1-dev
* commit 'b7702c5ce7f010fa5f19646fd79f28ff04e7014b':
  BufferQueueProducer: Throttle EGL frame production.
2014-10-08 16:59:38 +00:00
Jesse Hall b7702c5ce7 Merge "BufferQueueProducer: Throttle EGL frame production." into lmp-mr1-dev 2014-10-08 16:50:13 +00:00
Narayan Kamath 9ea09757fa Fix broken error check in Parcel::readBlob
mmap returns MAP_FAILED (which is -1) and not NULL on
failure.

Diagnosed by cferris.

bug: 17909809

Change-Id: I609788ebf94742ef88af002d2d3f3bc9b9e520ac
2014-10-08 17:37:38 +01:00
Jesse Hall f570be2ef9 am f3b5cea6: am 366998d8: am 78639c22: Merge "Parcel: extra validation/debug code for writeDupFileDescriptor" into lmp-dev
* commit 'f3b5cea662da350684b9fd7a8f486c42e57bee6d':
  Parcel: extra validation/debug code for writeDupFileDescriptor
2014-10-07 00:40:24 +00:00
Jesse Hall f3b5cea662 am 366998d8: am 78639c22: Merge "Parcel: extra validation/debug code for writeDupFileDescriptor" into lmp-dev
* commit '366998d87109578eb8c33d2e94d61fe7f189beb8':
  Parcel: extra validation/debug code for writeDupFileDescriptor
2014-10-07 00:34:57 +00:00
Jesse Hall 5cc3b8b4c8 am 78639c22: Merge "Parcel: extra validation/debug code for writeDupFileDescriptor" into lmp-dev
* commit '78639c22acfa5e56d87fd6fe8340d083536b29fc':
  Parcel: extra validation/debug code for writeDupFileDescriptor
2014-10-06 22:45:57 +00:00
Jesse Hall 78639c22ac Merge "Parcel: extra validation/debug code for writeDupFileDescriptor" into lmp-dev 2014-10-06 22:36:54 +00:00
Jesse Hall ccf851f108 Parcel: extra validation/debug code for writeDupFileDescriptor
Temporary extra debug validation for b/17477219: a Parcel recipient is
getting a positive but invalid fd unexpectedly. Trying to track down
where it's coming from.

Debug code for bug: 17477219
Change-Id: Idb1e71621025a3928c7adc88fd44790e1abd2a01
2014-10-06 15:23:56 -07:00
Aravind Akella 5b8d3eed87 am ae29ee0a: am 93176114: am a7eb4b74: Merge "Fix sockfd leakage in SensorService." into lmp-dev
* commit 'ae29ee0a9eea291316248a90799ff28f35defeb6':
  Fix sockfd leakage in SensorService.
2014-10-03 23:57:35 +00:00
Aravind Akella ae29ee0a9e am 93176114: am a7eb4b74: Merge "Fix sockfd leakage in SensorService." into lmp-dev
* commit '93176114cf34c9874c2db70fd7665e9f95dda9d0':
  Fix sockfd leakage in SensorService.
2014-10-03 22:39:19 +00:00
Eric Penner 99a0afbaee BufferQueueProducer: Throttle EGL frame production.
Throttling was previously controlled by a combination of the
driver and the number of buffers in the queue. This patch makes
a more consistent trade-off, which allows two GPU frames pending
but not three. More buffering could improve throughput in the
case of varying frame times, but this also increases latency.

Bug: 17502897
Change-Id: I4ee68019ca94c635294c5959931a555a6c4ef2df
2014-10-03 14:57:09 -07:00
Aravind Akella 021543fc65 am a7eb4b74: Merge "Fix sockfd leakage in SensorService." into lmp-dev
* commit 'a7eb4b74f74423dafd88adf94a7984ae927c3a23':
  Fix sockfd leakage in SensorService.
2014-10-03 21:50:52 +00:00
Aravind Akella a7eb4b74f7 Merge "Fix sockfd leakage in SensorService." into lmp-dev 2014-10-03 21:45:37 +00:00
Aravind Akella 8a96955c8e Fix sockfd leakage in SensorService.
i) Call removeFd() only if the fd in the BitTube has been
previously added to the Looper. Use a flag to determine whether the fd
has been previously added or not.
ii) Increment mPendingFlushEventsToSend after holding a connectionLock.
iii) Store the number of acks that are pending in SensorEventQueue
 and send them all at once.

Bug: 17472228
Change-Id: I1ec834fea1112a9cfbd9cddd2198438793698502
2014-10-02 18:59:56 -07:00
Jesse Hall 6051dc2fcc am 8619132f: am 74efd6e6: am f05ef4e5: Merge "Surface: cancel the dequeued buffer when requestBuffer fails" into lmp-dev
* commit '8619132f167afab3775315acdf6e7097fff41a91':
  Surface: cancel the dequeued buffer when requestBuffer fails
2014-10-02 23:46:41 +00:00
Jesse Hall 8619132f16 am 74efd6e6: am f05ef4e5: Merge "Surface: cancel the dequeued buffer when requestBuffer fails" into lmp-dev
* commit '74efd6e6bec8a49f66090a5c0c18b65ba8a6fcad':
  Surface: cancel the dequeued buffer when requestBuffer fails
2014-10-02 23:43:31 +00:00
Jesse Hall 0c2da9719b am f05ef4e5: Merge "Surface: cancel the dequeued buffer when requestBuffer fails" into lmp-dev
* commit 'f05ef4e542c3041379025e16497ff23710de5dbf':
  Surface: cancel the dequeued buffer when requestBuffer fails
2014-10-02 23:41:45 +00:00
Jesse Hall f05ef4e542 Merge "Surface: cancel the dequeued buffer when requestBuffer fails" into lmp-dev 2014-10-02 23:11:09 +00:00
Michael Lentine 08c356c68a am dea55870: am 36462d9d: Merge "Add more logging for dup(fd) failure" into lmp-dev
* commit 'dea558703a737d7e017a4f7991ea7b0367916654':
  Add more logging for dup(fd) failure
2014-10-02 21:34:52 +00:00
Michael Lentine dea558703a am 36462d9d: Merge "Add more logging for dup(fd) failure" into lmp-dev
* commit '36462d9de00105ae46ee3dbb0f644fa6af599f97':
  Add more logging for dup(fd) failure
2014-10-02 19:44:43 +00:00
Michael Lentine df035b91df am 36462d9d: Merge "Add more logging for dup(fd) failure" into lmp-dev
* commit '36462d9de00105ae46ee3dbb0f644fa6af599f97':
  Add more logging for dup(fd) failure
2014-10-02 19:18:26 +00:00
Jesse Hall 9f5a1b6abd Surface: cancel the dequeued buffer when requestBuffer fails
Partial fix for bug: 17477219
Change-Id: Ibf5a9e26e02c4be8854925a77a70f5c9c7dcf6f2
2014-10-02 18:16:19 +00:00
Michael Lentine 36273c991b Add more logging for dup(fd) failure
Bug: 17477219
Change-Id: Ide0ae16d777c9af783023c705c18a93c00999147
2014-10-02 18:13:02 +00:00
Dianne Hackborn 7a29f687db am e5a59e37: am 5ee2c9d2: Work on issue #17656716: Unhandled exception in Window Manager
* commit 'e5a59e37f2a160f71459b1888ed2d268f9faa10e':
  Work on issue #17656716: Unhandled exception in Window Manager
2014-10-02 02:00:11 +00:00
Dianne Hackborn e5a59e37f2 am 5ee2c9d2: Work on issue #17656716: Unhandled exception in Window Manager
* commit '5ee2c9d20c0fbecf6b4a482eb8d8bfdf85d0d424':
  Work on issue #17656716: Unhandled exception in Window Manager
2014-10-02 00:57:48 +00:00
Dianne Hackborn e4499526ee am 5ee2c9d2: Work on issue #17656716: Unhandled exception in Window Manager
* commit '5ee2c9d20c0fbecf6b4a482eb8d8bfdf85d0d424':
  Work on issue #17656716: Unhandled exception in Window Manager
2014-09-30 20:23:02 +00:00
Dianne Hackborn 5ee2c9d20c Work on issue #17656716: Unhandled exception in Window Manager
Try to clean up the code paths coming in and out of binder IPCs to
plug any places where we could disrupt the gather flag of a thread,
causing it to keep gathering stack crawls (which is the thing that
is causing our strict mode data to become so large).

We now take care of saving and restoring this state in the core
IPC code path, not at the Java layer.

Change-Id: I73d564778da127bdce00f304225930e7f2318293
2014-09-30 11:30:03 -07:00
Dan Albert 5193aea69a am 56b3f887: am 6ee97e74: Merge "Fix a null dereference."
* commit '56b3f887a2a859eaac9f3c3eb2fa18eb5bf396da':
  Fix a null dereference.
2014-09-23 20:55:50 +00:00
Dan Albert 56b3f887a2 am 6ee97e74: Merge "Fix a null dereference."
* commit '6ee97e74d2c972dec2aa6a2f231b718eae54898f':
  Fix a null dereference.
2014-09-23 17:54:39 +00:00
Dan Albert 265f0d9dff am 6ee97e74: Merge "Fix a null dereference."
* commit '6ee97e74d2c972dec2aa6a2f231b718eae54898f':
  Fix a null dereference.
2014-09-23 17:53:39 +00:00
Dan Albert c78a0c1733 Fix a null dereference.
Change-Id: I7224c3368ff414620062bc08b80a6a94d55d7931
2014-09-23 09:51:51 -07:00
Lajos Molnar 147372fdf9 resolved conflicts for merge of 67d8bd66 to lmp-mr1-dev-plus-aosp
Change-Id: I5e7e6fdf0d2afe6c3e4a0ed6ef96afb4713a72bc
2014-09-19 06:23:46 -07:00
Lajos Molnar 435d9cde27 resolved conflicts for merge of 67d8bd66 to lmp-dev-plus-aosp
Change-Id: I2e9aab90ac53bb32630598f50cc26f6e46acf6d6
2014-09-18 20:09:39 -07:00
Lajos Molnar e7bda06398 resolved conflicts for merge of 67d8bd66 to lmp-dev-plus-aosp
Change-Id: Idbe39c6de8fe31ac57a9238c18b4c20d66dc73ad
2014-09-18 20:05:27 -07:00
Lajos Molnar 67d8bd66aa surfaceflinger: add getDisplayStats() method
This is used by media service to schedule video frames at the
proper time, based on precise vsync timings.

Bug: 14659809
Change-Id: I1a90603f3dc09dca9aa4f90a3aa845fab56e0a5e
2014-09-18 17:03:20 -07:00
Dan Albert 1474f8864f Don't check if this == NULL.
Entering a method with this == NULL is undefined behavior. Clang whines
about this.

Change-Id: Ibde628395ca10dfef0d2f59e81280576f104b83c
2014-09-16 17:52:06 -07:00
Dan Albert 94ba882df2 am 4355c0c9: am e1e3d278: Merge "Clean cruft out of makefiles."
* commit '4355c0c98644c37f0511257403bbfb71b342e2df':
  Clean cruft out of makefiles.
2014-09-12 19:28:17 +00:00
Hans Boehm d898618914 am e03abcd6: am 4a7001ca: Merge "Work around C11 const atomic restrictions."
* commit 'e03abcd61b127b10391b8257c35fbe66053e417a':
  Work around C11 const atomic restrictions.
2014-09-12 19:28:16 +00:00
Aravind Akella f627c969e1 am 3d0daa57: am 8493b79e: SensorService fixes
* commit '3d0daa57f5f180418fdecbf06f6a5a41e566f6d9':
  SensorService fixes
2014-09-12 19:20:58 +00:00
Dan Albert 4355c0c986 am e1e3d278: Merge "Clean cruft out of makefiles."
* commit 'e1e3d278549eb6389eb0b5fa3f13a4ac079a55a2':
  Clean cruft out of makefiles.
2014-09-12 16:22:03 +00:00
Hans Boehm e03abcd61b am 4a7001ca: Merge "Work around C11 const atomic restrictions."
* commit '4a7001cae482e3c9410001360374c8fe9d5a2846':
  Work around C11 const atomic restrictions.
2014-09-12 15:54:52 +00:00
Aravind Akella 3d0daa57f5 am 8493b79e: SensorService fixes
* commit '8493b79e1cff92450076ca7450c4bf4e434a6816':
  SensorService fixes
2014-09-12 05:36:58 +00:00
Dan Albert b79dfe6721 Clean cruft out of makefiles.
Cleans up manual uses of stlport and bionic (and removes uses of private
bionic headers).

Change-Id: I157309d702e59152adfa3450939082248ae4c043
2014-09-11 18:49:47 -07:00
Hans Boehm c0df68bb80 Work around C11 const atomic restrictions.
Cast away the const qualifier in BBinder::findObject.  C11, unlike C++11,
does not allow loads from const atomics.  This is widely regarded as
a bug (see WG14 DR 459).  This is a hack to work around it until it's
officially fixed in the spec.

load_const_atomic was adapted from commit
1e8587a479fd8b1ce9b594298a93f517816e8f15

I don't think we want to dignify this by putting it into a header file.

Bug:17067219
Change-Id: Icbfcbda2722e6f80d2bb065a0bb3ec7634bcacb2
2014-09-11 14:49:09 -07:00
Aravind Akella 8493b79e1c SensorService fixes
i) Significant Motion multiple clients fix. Make a copy of
  mActiveConnections vector before cleaning up SensorEventConnections
  when one-shot sensors trigger.
  ii) Maintain a mapping between flush_complete_events and
  SensorEventConnections to accurately map flush() API calls and
  corresponding flush_complete_events
  iii) Remove all references to 1_1 and 1_2 HALs.
  iv) Dynamically allocate sensor_event buffers in SensorService main
  threadLoop.

Bug: 17412359
Change-Id: If3c3986197660cafef2d2e0b4dc7582e229cf1c4
2014-09-10 18:24:18 -07:00
Riley Andrews 03c2e83e73 am 75ec33e0: am d15ef27f: Update ScreenshotClient to take advantage of rotation in surfaceflinger\'s screencap api
* commit '75ec33e0e609e3ef074f4230c2227e52bf82ad06':
  Update ScreenshotClient to take advantage of rotation in surfaceflinger's screencap api
2014-09-09 22:16:46 +00:00
Riley Andrews 25d10ce9ec am 129dc842: am edb86f9f: Merge "Add rotation to surfaceflingers screen cap." into lmp-dev
* commit '129dc8423da319d42af6ef71046c39ba59c0d878':
  Add rotation to surfaceflingers screen cap.
2014-09-09 22:16:38 +00:00
Riley Andrews 75ec33e0e6 am d15ef27f: Update ScreenshotClient to take advantage of rotation in surfaceflinger\'s screencap api
* commit 'd15ef27f9b13727fa7358e3c09572f66bb1e0668':
  Update ScreenshotClient to take advantage of rotation in surfaceflinger's screencap api
2014-09-09 21:55:45 +00:00
Riley Andrews 129dc8423d am edb86f9f: Merge "Add rotation to surfaceflingers screen cap." into lmp-dev
* commit 'edb86f9f681e082a64a670814ee4d73ccf39942a':
  Add rotation to surfaceflingers screen cap.
2014-09-09 21:55:26 +00:00
Riley Andrews d15ef27f9b Update ScreenshotClient to take advantage of rotation in surfaceflinger's screencap api
Change-Id: I836649d9d5cd5958ce34e47f26f4a36d2d05d24c
2014-09-09 19:41:32 +00:00
Dan Albert 58a81ba506 am 5273a978: resolved conflicts for merge of 86aeb9ef to lmp-dev-plus-aosp
* commit '5273a978337cbee2c1aae2f4d5c1b0e9d8dd6e1c':
  Make string literal concatenation play nice with C++11.
2014-09-09 05:25:03 +00:00
Dan Albert 5273a97833 resolved conflicts for merge of 86aeb9ef to lmp-dev-plus-aosp
Change-Id: I82fe2b385156d9bdb9e7183e308d7b2a4167b6ce
2014-09-08 22:15:20 -07:00
Riley Andrews c3ebe66b49 Add rotation to surfaceflingers screen cap.
+ This is needed so that activity manager does not
  have to do cpu side rotations when capturing recents
  thumbnails.

Change-Id: If998008e675ad01305db8399fd643cf4608b7025
2014-09-09 03:51:16 +00:00
Dan Albert 8b49125f10 Make string literal concatenation play nice with C++11.
In C++11 mode, "foo"MACRO_THAT_EXPANDS_TO_STRING gets lexed as a user
defined literal. Add space around the macro.

Change-Id: I2741f5be9c0b1562e0f413d1309ef9d687e89b41
2014-09-08 18:53:39 -07:00
Jesse Hall 46a1f6b40e GLConsumer: correct EGL_NO_DISPLAY to EGL_NO_CONTEXT
Change-Id: I4dcb57a0db9ee3c5222cd453c9213859384212b0
2014-09-04 10:07:28 -07:00
Hans Boehm 553231f65e Fix CAS argument type.
Gcc apparently doesn't check; clang does.

Bug:17067219
Change-Id: I184084a5063131dbc857c63f97e70e78a05e1a76
(cherry picked from commit 1ddaadb598)
2014-09-02 23:26:16 -07:00
Hans Boehm 08ff802151 Revert "Revert "Revert "Revert "Remove incorrect android_atomic_...64 use.""""
After fixing b/16874785.

This reverts commit f010a05c7e.

Original comment, which actually describes the effect of this:

Change the mExtras field in Binder.h to be a stdatomic.h atomic
value, and replace references to it with proper stdatomic.h calls.
This removes one of a small number of remaining 64 bit
android_atomic references.  It also replaces the erroneously
non-atomic read accesses to mExtras.

It would be better if this used the C++11 <atomic> facility,
but we don't quite have that yet.

Fixes

Bug:16513433

Change-Id: I1645ca5d6f60595bf5d388913665ce4b8780b26d
(cherry picked from commit 3effababf2)
2014-09-02 16:11:46 -07:00
Eric Penner b207e95b46 am 57782cd2: am 5c4a1566: Merge "GLConsumer: Fix eglTerminate/eglInit edge case." into lmp-dev
* commit '57782cd25539aa163b885cd336144d4c8bc9f665':
  GLConsumer: Fix eglTerminate/eglInit edge case.
2014-08-27 18:35:43 +00:00
Eric Penner 57782cd255 am 5c4a1566: Merge "GLConsumer: Fix eglTerminate/eglInit edge case." into lmp-dev
* commit '5c4a15665968471ddbac0b476514d00503e997c7':
  GLConsumer: Fix eglTerminate/eglInit edge case.
2014-08-27 18:26:20 +00:00
Eric Penner 2d14a0ed4f GLConsumer: Fix eglTerminate/eglInit edge case.
If a display is terminated and then initialized, we can't detect
this using the display itself (it has the same value), but all
EglImages still become invalid for the display. This patch detects
this during image binding and forces creation of a new EglImage.

Bug: 10430249
Change-Id: I75101c50962f21263dca3ec6e241a2e5a3c23dad
2014-08-27 03:10:58 +00:00
Hans Boehm 02a1c2cb37 am efc0b35f: Merge "Fix CAS argument type."
* commit 'efc0b35fbd256bb3e225f4a1b953d0895ee3e99a':
  Fix CAS argument type.
2014-08-19 22:28:41 +00:00
Riley Andrews 38e451f057 am 51d3d176: Merge "Within CpuConsumer, use gralloc lockAsync/unlockAsync" into lmp-dev
* commit '51d3d176e35abc8b72e55035b0f7b81388ee044d':
  Within CpuConsumer, use gralloc lockAsync/unlockAsync
2014-08-19 21:07:51 +00:00
Michael Wright 5a7ad73bd2 am 62fbb163: Shelve InputFlinger for another release. DO NOT MERGE
* commit '62fbb16383d6d8268821f947e2c6d0828f7e2b41':
  Shelve InputFlinger for another release. DO NOT MERGE
2014-08-19 01:33:52 +00:00
Riley Andrews d53e052322 Within CpuConsumer, use gralloc lockAsync/unlockAsync
Change-Id: I6b2cd195e111c3c7bf94c8052af4db92e09649a5
2014-08-19 19:46:10 +00:00
Elliott Hughes cb3b7ce1d8 am 703b60ce: Merge "Use gettid directly in binder."
* commit '703b60ce39e52d319074adf53704d33f9c16dbbd':
  Use gettid directly in binder.
2014-08-18 19:34:22 +00:00
Michael Wright 62fbb16383 Shelve InputFlinger for another release. DO NOT MERGE
Change-Id: I0f034a2b8b1d9192f61f5001799bd3aa4b3964c7
2014-08-18 10:17:18 -07:00
Hans Boehm b5a2fe50be am 02a1c2cb: am efc0b35f: Merge "Fix CAS argument type."
* commit '02a1c2cb3745179fc0e92515ef5905fe1f8fb17e':
  Fix CAS argument type.
2014-08-19 22:36:28 +00:00
Riley Andrews 82e178cb96 am 38e451f0: am 51d3d176: Merge "Within CpuConsumer, use gralloc lockAsync/unlockAsync" into lmp-dev
* commit '38e451f0574de257eb46d0ba8c9a07c1556db24d':
  Within CpuConsumer, use gralloc lockAsync/unlockAsync
2014-08-19 21:19:16 +00:00
Hans Boehm efc0b35fbd Merge "Fix CAS argument type." 2014-08-16 04:28:29 +00:00
Hans Boehm 1ddaadb598 Fix CAS argument type.
Gcc apparently doesn't check; clang does.

Bug:17067219
Change-Id: I184084a5063131dbc857c63f97e70e78a05e1a76
2014-08-19 13:42:54 -07:00
Elliott Hughes fa6ad07c4e Use gettid directly in binder.
Bug: 17048545
Change-Id: I1df378135961e085a52f6cc5694ad74cd73aac19
2014-08-18 10:38:38 -07:00
Hans Boehm dc1fb90857 am a0187a9c: Merge "Revert "Revert "Revert "Revert "Remove incorrect android_atomic_...64 use."""""
* commit 'a0187a9c83cb042b4cb92dac59214247bb7affcf':
  Revert "Revert "Revert "Revert "Remove incorrect android_atomic_...64 use.""""
2014-08-13 00:19:23 +00:00
Hans Boehm 3effababf2 Revert "Revert "Revert "Revert "Remove incorrect android_atomic_...64 use.""""
After fixing b/16874785.

This reverts commit f010a05c7e.

Change-Id: I1645ca5d6f60595bf5d388913665ce4b8780b26d
2014-08-12 22:56:00 +00:00
Hans Boehm f010a05c7e Revert "Revert "Revert "Remove incorrect android_atomic_...64 use."""
This reverts commit 66629e0de5.

Change-Id: Ic298b345d0e500d18e4297b00e755ce3340f13fb
2014-08-09 01:17:13 +00:00
Rachad 7d1cd4aae2 Merge "Tunneled Video Playback support" into lmp-dev 2014-08-09 00:45:27 +00:00
Hans Boehm 66629e0de5 Revert "Revert "Remove incorrect android_atomic_...64 use.""
This reverts commit 9dc5c269f7.
Adds a stdint.h include in case stdatomic.h stops including that.

Change-Id: If3dd1db1f1132c0f2dc1efb0a44617d3f36d7cfb
2014-08-08 17:14:30 -07:00
Michael Lentine 45e2fc2226 Revert "Modify EGL to disconnect the window when the surface gets destroyed."
This reverts commit 843cbb241d.
2014-08-08 10:30:44 -07:00
Hans Boehm 9dc5c269f7 Revert "Remove incorrect android_atomic_...64 use."
This reverts commit 88b7541d68.

Change-Id: Ie701c308451a3697bb167aff119318b932133f90
2014-08-06 22:45:13 +00:00
Aravind Akella b37ba399c1 Sensor related changes for NDK.
i) ASensorManager_getDefaultSensor returns a wake-up/non wake-up sensor
      depending on the type.
   ii) Add ASensor_isWakeUpSensor and ASensorManager_getDefaultSensorEx
       methods.
Bug : 16399898
Change-Id: I1a86fb8d9de23039fdf41679d1487e1cd761a9d0
2014-08-05 17:17:51 -07:00
Rachad 7cb0d39016 Tunneled Video Playback support
Added native_window_set_sideband_stream() method to Surface.[h|cpp]
 Added ConfigureVideoTunnelModeParams OMX configuration structure to
 HardwareAPI.h

Bug: 16132368
Change-Id: I28fa1b9dbe858d93e353e0991098cad45c626bd9
2014-08-04 21:57:22 +00:00
Aravind Akella 64ffcb0944 Sensor.cpp changes.
1) Rename TILT_DETECTOR
  2) Set mFlags correctly for wake-up sensors.
  2) Log errors for incorrect sensor flags.

Change-Id: Ia449217d3b8a53353ad6b5c33c544ce37eb1de4f
2014-07-31 09:40:03 -07:00
Michael Lentine 47e45405d1 Allow for resizing of Virtual Displays.
Modify SurfaceFlinger to use VirtualDisplaySurface in all cases when a virtual
display is used. Add functionality in VirtualDisplaySurface to resize the
buffers aquired in the QueueBufferOutput. Add transaction support in
SurfaceFlinger for resize. Add the modification of the size in DisplayDevice.

Change-Id: Iae7e3556dc06fd18d470adbbd76f7255f6e6dd6b
Tested: None
2014-07-30 14:36:25 -07:00
Michael Wright 1f6078aef7 Have VirtualDisplays send SF resize messages when resizing
Change-Id: I76d15b22099a659450ec875836c9bf2b6584838f
2014-07-30 11:23:44 -07:00
Michael Lentine cd36eb445b Merge "Modify EGL to disconnect the window when the surface gets destroyed." into lmp-dev 2014-07-25 21:16:23 +00:00
Michael Lentine 843cbb241d Modify EGL to disconnect the window when the surface gets destroyed.
Bug: 14445579

Change-Id: I1d263ff6cffcb6e448761fca7ca4b06466ad65aa
2014-07-29 18:59:56 -07:00
Aravind Akella fd8498c41e Remove WAKE_UP_* sensor constants.
Change-Id: I3de9d114ce82de4ed841932747d72e1f6f73c24f
2014-07-28 18:01:11 -07:00
Antoine Labour 11f14871db BufferQueueProducer: fix which slot gets pre-allocated
Commit 78014f32da introduced a bug that
made us pre-allocate buffers into the last available free slots instead
of the first available ones. This in turn caused more re-allocations,
and possibly triggered driver bugs.

Change-Id: Ic4a70e676b4f2bbb054bc873be62ced26e3099a0
2014-07-25 18:47:25 -07:00
Aravind Akella c268068c55 Merge "SensorService performance improvements." into lmp-dev 2014-07-24 15:37:54 +00:00
Aravind Akella 56ae42613c SensorService performance improvements.
i) Send ack for wake_up sensors on the socket connection instead of using Binder RPC.
  ii) Cache events per connection in case there are write failures. Compute cache size
      from FIFO counts of sensors.
 iii) Send FlushCompleteEvent only for apps that explicitly called flush().

Change-Id: I018969736b7794b1b930529586f2294a03ee8667
2014-07-24 17:23:01 -07:00
Eric Penner 2295687487 Merge "GLProducer: Reference count images rather than buffers." into lmp-dev 2014-07-24 15:36:21 +00:00
Chong Zhang 2cbba477be add noteResetVideo/Audio to IBatteryStats
Bug: 12979595
Change-Id: Ida474e539a3af0a85ec157a66bbf986430c8020e
2014-07-23 21:51:56 +00:00
Colin Cross 45e695a248 Merge "crash if getNativeBuffer() called on NULL GraphicBuffer" into lmp-dev 2014-07-23 18:56:15 +00:00
Hans Boehm 88b7541d68 Remove incorrect android_atomic_...64 use.
Change the mExtras field in Binder.h to be a stdatomic.h atomic
value, and replace references to it with proper stdatomic.h calls.
This removes one of a small number of remaining 64 bit
android_atomic references.  It also replaces the erroneously
non-atomic read accesses to mExtras.

It would be better if this used the C++11 <atomic> facility,
but we don't quite have that yet.

Bug: 16513433
Change-Id: Ibabb88d05025187ee1ce6c7f1aa670b133a547f8
2014-07-23 11:35:13 -07:00
Colin Cross 18fae75350 crash if getNativeBuffer() called on NULL GraphicBuffer
If getNativeBuffer() is called on a NULL GraphicBuffer the
static_cast of this from GraphicBuffer* to ANativeWindowBuffer*
will return a small pointer like (ANativeWindowBuffer*)0x10.
This value can propagate past NULL checks until it causes a crash
far away from the original NULL pointer.  Crash immediately
instead.

Change-Id: Id614b9eb1484108b3c3c733545309844c4b87532
2014-07-22 17:47:03 -07:00
Chong Zhang 9b365296a7 Merge "update battery status for audio/video" into lmp-dev 2014-07-22 21:50:21 +00:00
Chong Zhang bd42d38b16 update battery status for audio/video
Bug: 12979595

Change-Id: Ic8e8d625becc6d1050f840ad63b7423f388eeba3
2014-07-22 23:08:53 +00:00
Antoine Labour 78014f32da BufferQueue: release mutex while allocating. DO NOT MERGE
BufferQueueProducer::allocateBuffers used to keep the BufferQueueCore
mutex while doing the buffer allocation, which would cause the consumer
(which also needs the mutex) to block if the allocation takes a long
time.
Instead, release the mutex while doing the allocation, and grab it again
before filling the slots. Keep a bool state and a condvar to prevent
other producers from trying to allocate the slots while the mutex is
released.

Bug: 11792166

Change-Id: I4ab1319995ef892be2beba892f1fdbf50ce0416d
(cherry picked from commit ea96044470)
2014-07-22 19:45:55 +00:00
Eric Penner 5c3d243fcc GLProducer: Reference count images rather than buffers.
In most cases, EGLImages can be created one-to-one with graphic
buffers in slots, but that was difficult due to some special
cases:
- ReleaseTexImage binds a custom 'unslotted' debug image.
- When all slots are freed, we still need to hang on to one.

These cases were handled by keeping an additional reference to
the 'current' buffer (mCurrentTextureBuf), but we would create
new images since we can't reference count them in the same way.
This patch uses the same semantics, except that it reference
counts the image (an EglImage wrapper class) rather than just
buffer. The wrapper class also detects the cases when we need
a new EGLImage, and only creates them in those rare cases.

Change-Id: I2915761dbe49d2a9bda1f59e60f857543634636b
2014-07-21 18:16:12 -07:00
Jeff Brown 31d825d7ed Add glance gesture for doze mode.
Change-Id: I038a706c3999200313ff5360c5ff1150ec081f08
2014-07-17 18:19:53 -07:00
Ruben Brunk 1681d95989 Add sticky transform to surfaceflinger.
Bug: 15116722

- Adds a sticky transform field that can be set from a
  SurfaceFlinger client Surface.  This transform is
  added to any transform applied to the Surface.

Change-Id: Idaa4311dfd027b2d2b8ea5e2c6cba2da5779d753
2014-07-14 22:14:32 +00:00
Dan Stoza dc56bf721a Merge "BufferQueue: Add allocateBuffers method" 2014-06-27 15:56:14 +00:00
Dan Stoza ab57491de3 GLConsumer: Allow creation in detached mode
Adds a constructor that doesn't require a GLES texture name and sets
up the GLConsumer in detached mode.

Bug: 15616428
Change-Id: Idc9ea2e59baa24bbd959da9fffe0fb71c0aa9818
2014-06-25 15:00:48 -07:00
Dan Stoza e49ba8e2ed GLConsumer: Stop using default constructor params
Removes the dependency on default constructor parameters for
GLConsumer so that a different constructor prototype can safely be
added.

Change-Id: I0da924bbd4c141edbf305598c1be8bc575654680
2014-06-24 13:09:19 -07:00
Dan Stoza 29a3e90879 BufferQueue: Add allocateBuffers method
This adds an allocateBuffers method to BufferQueue, which instructs
it to allocate up to the maximum number of buffers allowed by the
current configuration. The goal is that this method can be called
ahead of render time, which will prevent dequeueBuffers from blocking
in allocation and inducing jank.

This interface is also plumbed up to the native Surface (and, in
another change, up to the Java Surface and ThreadedRenderer).

Bug: 11792166
Change-Id: I4aa96b4351ea1c95ed5db228ca3ef98303229c74
2014-06-20 13:13:57 -07:00
Narayan Kamath f8f419bfcd Merge "Remove Parcel::writeIntPtr." 2014-06-10 21:18:16 +00:00
Narayan Kamath 7da40c0a84 Remove Parcel::writeIntPtr.
All uses of this API have been removed. It should
never have been made public in the first place.

bug: 15424960
Change-Id: Id07d24ec95b2b393e6da138a7e8a9a4ecebeca94
2014-06-12 15:26:39 +01:00
Aravind Akella adb65d9add Merge "Surface reportingMode for Sensors." 2014-06-12 03:30:50 +00:00
Aravind Akella 0e025c5af3 Surface reportingMode for Sensors.
Change-Id: Iac8dd3408c90eb7d285a2e8043131fab3a7e58fa
2014-06-12 14:49:41 -07:00
Prashant Malani 7227b96a73 Merge "surfaceflinger: Replace blank/unblank with setPowerMode" 2014-06-12 03:30:50 +00:00
Mark Salyzyn 55fc54970b am 72676e7d: am 0e1313cd: Merge "libgui: 64-bit compile issues"
* commit '72676e7d0db89d477495245aa15f1a128b5c35bc':
  libgui: 64-bit compile issues
2014-06-11 17:44:52 +00:00
Narayan Kamath f905bc3bdc Remove Parcel::writeIntPtr.
All uses of this API have been removed. It should
never have been made public in the first place.

bug: 15424960

(cherry picked from commit 7da40c0a84)

Change-Id: I8d89f62dbdaee7149ef908e0c97417b85e0c48a2
2014-06-13 10:27:33 +01:00
Michael Wright b37c8c5453 Merge "Fixup more potential issues / warnings in string formats" 2014-06-10 20:16:08 +00:00
Michael Wright 63ff3a84ae Fixup more potential issues / warnings in string formats
Change-Id: I323e44f950b2e758dc9ff4510b2e13ca870eb849
2014-06-10 13:03:17 -07:00
Michael Wright 25be048729 Merge "Fix warning in logging string interpolation" 2014-06-10 03:12:19 +00:00
Michael Wright d0a4a6234f Fix warning in logging string interpolation
Change-Id: I86623083f68664d31ea277958837a4c2985037b4
2014-06-09 19:03:32 -07:00
Mark Salyzyn 8f515ce1c5 libgui: 64 bit compile issues (part deux)
- nsecs_t printed with PRId64
- int64_t/uint64_t print issues
- some size_t printing issues.
- missing argument to BQ_LOGV

Change-Id: I493f2b578e801dc38c44f8c536faa45266720402
2014-06-09 15:42:26 -07:00
Mark Salyzyn 72676e7d0d am 0e1313cd: Merge "libgui: 64-bit compile issues"
* commit '0e1313cdb1d5d21e4d6123f77b4238f1c8c2d564':
  libgui: 64-bit compile issues
2014-06-09 21:46:25 +00:00
Mark Salyzyn 911004506d libgui: 64-bit compile issues
Change-Id: I29961c1567b8431518a7d032ea43385e23b7bb37
2014-06-09 14:27:45 -07:00
Narayan Kamath e86420e399 Merge "Fix flattening/unflattening of android::Sensor." 2014-06-06 10:05:09 +00:00
Prashant Malani 2c9b11f029 surfaceflinger: Replace blank/unblank with setPowerMode
We replace the blank/unblank calls in surfaceFlinger with a more generic
setPowerMode() routine.

Some displays support different power modes (for example, with reduced
color palettes). Depending on the use case we should be able to toggle
these modes, so as to achieve incremental power savings.

Initially, three power modes will be supported:
- HWC_POWER_MODE_OFF
- HWC_POWER_MODE_DOZE
- HWC_POWER_MODE_NORMAL

HWC_POWER_MODE_OFF will correspond to blanking the display, while
HWC_POWER_MODE_NORMAL will correspond to unblanking. HWC_POWER_MODE_DOZE
will put the display into a low power setting, if it is supported in
hardware.

If such a low power mode is not supported, it should be treated as a
call to set the mode to HWC_POWER_MODE_NORMAL.

As a consequence of adding the mPowerMode field, the mScreenAcquired is
no longer required, and thus references to it are removed and replaced
equivalent references to mPowerMode.

We also add the glue code to connect the services invocation of setting
a power mode and the HAL implementation in HWComposer.

Bug: 13472578
Change-Id: I431595ecf16d2f2c94259272db3dd42f29636204
Signed-off-by: Prashant Malani <pmalani@google.com>
2014-06-05 16:35:52 -07:00
Narayan Kamath c2ac5897ec am 065e9c86: Merge "Fix mips build for libbinder."
* commit '065e9c86e249beac08783c7e9334d5709e2c9080':
  Fix mips build for libbinder.
2014-06-04 17:28:38 +00:00
Narayan Kamath 065e9c86e2 Merge "Fix mips build for libbinder." 2014-06-04 14:53:08 +00:00
Narayan Kamath 2f1f742b90 Fix mips build for libbinder.
Mips specific code was using an uninitialized variable.

(cherry picked from commit 2c68d380c9)

Change-Id: I6b562b3f6d2084b72e747736cbf43684c2049f8e
2014-06-04 15:34:16 +01:00
Narayan Kamath 87947be618 Merge "Fix mips build for libbinder." 2014-06-04 14:32:59 +00:00
Narayan Kamath 2c68d380c9 Fix mips build for libbinder.
Mips specific code was using an uninitialized variable.

Change-Id: I445043c76ebfa420b26376ade60f8068b4ea0b11
2014-06-04 15:05:13 +01:00
Mark Salyzyn b09b936d8e am f0a24759: am a28750ee: Merge "binder: Turn on -Werror"
* commit 'f0a2475905786d5457e7af838ac714acbfdafa4f':
  binder: Turn on -Werror
2014-06-03 20:54:48 +00:00
Mark Salyzyn f0a2475905 am a28750ee: Merge "binder: Turn on -Werror"
* commit 'a28750eec38c848230adfeef28725b29cc36a9da':
  binder: Turn on -Werror
2014-06-03 20:48:35 +00:00
Mark Salyzyn d4ecccfd20 binder: Turn on -Werror
Change-Id: I0ee785927a7ae5f731b02176b0b781b87c22a24e
2014-06-03 11:11:45 -07:00
Narayan Kamath db1972bd8e am 26063a91: am f1dd859b: Merge "x86_64: Align uint64_t/int64_t structure member to 8 bytes"
* commit '26063a9155ddd18d858cea7fac7c1ddf71e1bcb7':
  x86_64: Align uint64_t/int64_t structure member to 8 bytes
2014-06-03 13:58:40 +00:00
Narayan Kamath 26063a9155 am f1dd859b: Merge "x86_64: Align uint64_t/int64_t structure member to 8 bytes"
* commit 'f1dd859baa114995bcbcfb7119e939d0b4f45ed5':
  x86_64: Align uint64_t/int64_t structure member to 8 bytes
2014-06-03 13:29:00 +00:00
Narayan Kamath f1dd859baa Merge "x86_64: Align uint64_t/int64_t structure member to 8 bytes" 2014-06-03 10:06:55 +00:00
Mark Salyzyn edcf7f4d3a binder: rm utils/Debug.h as unutilized
Change-Id: I52eb8b64b71cec7ffd4560e902daf358fda98b4a
2014-05-30 16:51:18 +00:00
Narayan Kamath 403ec9f15a Fix flattening/unflattening of android::Sensor.
Write string lengths as uint32_t so that their width is
the same on 32 and 64 bit processes.

Note that this fixes another bug as a side effect; getFlattenedSize
was assuming that sizeof(uint32_t) == sizeof(size_t).

Change-Id: I7b6e3993e1f1ac45c14832ce59c59e0772855a2f
2014-05-30 14:40:13 +01:00
Fengwei Yin 83e0e425c6 x86_64: Align uint64_t/int64_t structure member to 8 bytes
To make sure the stature which pass between 32/64bit process have
same memory layout for 32/64bit.

Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
Co-Authored-by: Narayan Kamath <narayan@google.com> (Unit test only.)
Change-Id: I1bc2d12cce41ec0bc484adcaf968f274bec75c12
2014-05-30 14:13:29 +01:00
Mark Salyzyn b8b3c536f4 am ea3f1da9: am 1ce5ecbe: am 63645c69: Merge "binder: rm utils/Debug.h"
* commit 'ea3f1da9013b33ecf3f3f8771393c1754a9aec59':
  binder: rm utils/Debug.h
2014-05-29 21:09:57 +00:00
Mark Salyzyn ea3f1da901 am 1ce5ecbe: am 63645c69: Merge "binder: rm utils/Debug.h"
* commit '1ce5ecbe3286380f5ff7ace289369ed006e9b40a':
  binder: rm utils/Debug.h
2014-05-29 21:06:36 +00:00
Mark Salyzyn 1ce5ecbe32 am 63645c69: Merge "binder: rm utils/Debug.h"
* commit '63645c69e03cf3862c52cfde6cbd5f5143ccd38a':
  binder: rm utils/Debug.h
2014-05-29 20:29:32 +00:00
Mark Salyzyn 317ff37cf7 binder: rm utils/Debug.h
Change-Id: I16931919a26c16a0d701771c93fa7fe1c6f60ef8
2014-05-29 13:10:03 -07:00
Dan Stoza 3d5c8a98c1 Merge "SurfaceFlinger: Add sourceCrop to screenshot" 2014-05-28 18:31:40 +00:00
Aravind Akella d9441e4c27 Surface maxDelay and isWakeUpSensor flag in Sensor.java.
Change-Id: Idd1e9045190beeca87b086b272e8cbf0bed05bae
2014-05-23 18:58:01 -07:00
Dan Stoza c18790018b SurfaceFlinger: Add sourceCrop to screenshot
Adds a sourceCrop Rect parameter to screenshot commands, which allows
clients to capture only a portion of the screen instead of the whole
screen.

Bug: 15137922
Change-Id: I629447573cd34ffb96334cde7ba02490b9ea06d8
2014-05-23 09:19:03 -07:00
Narayan Kamath f8c66b4bee am cfba3bf1: am c9fcaf37: Merge "Change InputMessage.motion.pointerSize to a uint32_t."
* commit 'cfba3bf1606dfdb1daf1be1c19176180660ae19d':
  Change InputMessage.motion.pointerSize to a uint32_t.
2014-05-16 12:10:21 +00:00
Narayan Kamath cfba3bf160 am c9fcaf37: Merge "Change InputMessage.motion.pointerSize to a uint32_t."
* commit 'c9fcaf3751af078ad730913304431197e4d1ae80':
  Change InputMessage.motion.pointerSize to a uint32_t.
2014-05-16 12:08:06 +00:00
Narayan Kamath ed5fd384b7 Change InputMessage.motion.pointerSize to a uint32_t.
This ensures it's the same size in both 32 and 64 bit
processes and also brings it in line with struct
MotionEntry.

(cherry-picked from bc6001b026)

Change-Id: I28e87050478920a54132efbbb8138076ebad1409
2014-05-16 12:53:16 +01:00
Aravind Akella d763fc7822 am 47d871b2: am d35e3af0: Set default values for FifoMaxEventCount and ReservedEventCount.
* commit '47d871b2795f714499a34ffe85b67f8577883f7b':
  Set default values for FifoMaxEventCount and ReservedEventCount.
2014-05-13 00:54:50 +00:00