Commit Graph

880 Commits

Author SHA1 Message Date
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
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
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 6a26be7c2b CpuConsumer: lock buffers that could be YUV as ycbcr
Bug: 17906609
Change-Id: Ic71af69ec3b19ab1224ed3ad5e0a97c60e81cda6
2015-01-28 16:52:43 -08: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 b93bca5d08 am a59d7a6a: Merge "GUI: Remove unused variables"
* commit 'a59d7a6a66a2b8dcb2d00dbd6371fa89ae45ab04':
  GUI: Remove unused variables
2014-12-09 20:09:18 +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 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 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 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
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
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 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
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 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
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
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 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 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
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
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
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 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 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
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 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 4355c0c986 am e1e3d278: Merge "Clean cruft out of makefiles."
* commit 'e1e3d278549eb6389eb0b5fa3f13a4ac079a55a2':
  Clean cruft out of makefiles.
2014-09-12 16:22:03 +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
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 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 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
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
Riley Andrews d53e052322 Within CpuConsumer, use gralloc lockAsync/unlockAsync
Change-Id: I6b2cd195e111c3c7bf94c8052af4db92e09649a5
2014-08-19 19:46:10 +00:00
Rachad 7d1cd4aae2 Merge "Tunneled Video Playback support" into lmp-dev 2014-08-09 00:45:27 +00: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
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
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
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
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
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 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
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
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
Aravind Akella 47d871b279 am d35e3af0: Set default values for FifoMaxEventCount and ReservedEventCount.
* commit 'd35e3af04d4b7e850a3b87b2211d1a3993f9b76f':
  Set default values for FifoMaxEventCount and ReservedEventCount.
2014-05-13 00:50:40 +00:00
Aravind Akella d35e3af04d Set default values for FifoMaxEventCount and ReservedEventCount.
Change-Id: I4f610c2912ffe1697d1ffb99c556d1c88578466e
2014-05-12 17:15:59 -07:00
Etienne Le Grand f63cbbf0e4 Merge "Add wake gesture in Sensor.cpp" 2014-05-12 19:38:13 +00:00
Greg Hackmann f974bffb36 am 38c9e132: am c1ffd351: am bd20e551: Merge "Use asynchronous lock/unlock API"
* commit '38c9e1327a5b24267c3dab5293bc9d7ada6e9fc9':
  Use asynchronous lock/unlock API
2014-05-12 18:18:47 +00:00
Greg Hackmann 38c9e1327a am c1ffd351: am bd20e551: Merge "Use asynchronous lock/unlock API"
* commit 'c1ffd351bc44483369271c11dd4c6391bba8c64c':
  Use asynchronous lock/unlock API
2014-05-12 18:12:34 +00:00
Francis Hart 8f3960179c Use asynchronous lock/unlock API
The gralloc API now provides a way for using lock/unlock with the Android
explicit synchronisation concept. This changes updates the GraphicBuffer class
to also expose this functionality, and updates the Surface class to make use of
in line with the dequeueBuffer/queueBuffer mechanism.

This new behaviour is dependent on GRALLOC_MODULE_API_VERSION_0_3. If the local
gralloc module does not support this then the existing synchronous lock/unlock
mechanism will be used.

Change-Id: I8c3fd9592e0c5400ac9be84450f55a77cc0bbdc5
2014-05-12 09:13:03 -07:00
Greg Hackmann 2f3dca149a am 9493d492: am 9eb142e3: am a9d49f99: Merge "Revert "Use asynchronous lock/unlock API""
* commit '9493d4924a59f14b698389386337a9c07a7ea3c4':
  Revert "Use asynchronous lock/unlock API"
2014-05-09 22:00:04 +00:00
Greg Hackmann 02528cf6aa am 4b46776f: am 8a6cd189: am f60564a1: Merge "Use asynchronous lock/unlock API"
* commit '4b46776ff88c5a365700b88e8b2b04e1b2c77e6e':
  Use asynchronous lock/unlock API
2014-05-09 21:54:48 +00:00
Greg Hackmann 9493d4924a am 9eb142e3: am a9d49f99: Merge "Revert "Use asynchronous lock/unlock API""
* commit '9eb142e34a5bc11508c0bd6f60ad3933c60aa530':
  Revert "Use asynchronous lock/unlock API"
2014-05-09 21:51:51 +00:00
Greg Hackmann 53ec72523a Revert "Use asynchronous lock/unlock API"
This reverts commit 378ef07760.

Change-Id: I1de5ab973b5383633e75924fe90ac3ca8216c36a
2014-05-09 21:36:48 +00:00
Greg Hackmann 4b46776ff8 am 8a6cd189: am f60564a1: Merge "Use asynchronous lock/unlock API"
* commit '8a6cd189034ec4709a66e581b41deba56c028291':
  Use asynchronous lock/unlock API
2014-05-09 21:13:16 +00:00
Etienne Le Grand e284a90f50 Add wake gesture in Sensor.cpp
Change-Id: Ifb1744acffc2d57da43112fb9966261e8246d6de
2014-05-07 19:49:05 -07:00
Dan Stoza 7f7da32569 Enable changing display configuration
This allows querying and switching display device configurations
through the ISurfaceComposer/SurfaceComposerClient interface.

Bug: 14320401
Change-Id: I8c22165698950e5da32204c1c4da92122f91a715
2014-05-05 16:45:26 -07:00
Francis Hart 378ef07760 Use asynchronous lock/unlock API
The gralloc API now provides a way for using lock/unlock with the Android
explicit synchronisation concept. This changes updates the GraphicBuffer class
to also expose this functionality, and updates the Surface class to make use of
in line with the dequeueBuffer/queueBuffer mechanism.

This new behaviour is dependent on GRALLOC_MODULE_API_VERSION_0_3. If the local
gralloc module does not support this then the existing synchronous lock/unlock
mechanism will be used.

Change-Id: I77daa1beb197b63b1c2f281b8414ac4ae4b5b03c
2014-05-02 13:28:14 -07:00
Aravind Akella 943de2f71b Merge "Enable wakeup sensors." 2014-04-24 00:41:08 +00:00
Aravind Akella 9a844cf78f Enable wakeup sensors.
SensorService should hold a wakelock till the app reads events from a wakeup sensor. Currently drivers hold a wakelock with a
timeout while delivering events from a wake up sensor like Significant Motion. This hack can be removed now.

Bug: 9774884
Change-Id: If3b5acb99c9cf0cd29012fcfa9d6b04c74133d01
2014-04-23 14:38:56 -07:00
Dan Stoza e0d5862ad8 Remove deprecated BufferQueue constructor
Finally remove the BufferQueue constructor itself. From now on, all
BufferQueues must be created through the createBufferQueue method.

Bug: 13415624
Change-Id: I192bf9430265bab761dcd59db1f02c9d0ac4feed
2014-04-22 14:12:55 -07:00
Dan Stoza 4cbf3c5344 Merge "BufferQueue: Guard against unbounded queue growth" 2014-04-21 21:40:33 +00:00
Dan Stoza fb39827ebc Merge "BufferQueue: Increase max slots from 32 to 64" 2014-04-21 16:11:22 +00:00
Dan Stoza ae3c368233 BufferQueue: Guard against unbounded queue growth
Adds logic to dequeueBuffer that blocks if there are currently too
many buffers in the queue. This prevents unbounded growth around
times where the slots are cleared but the queue is not (e.g.,
during rapid connect/disconnect or setBufferCount activity). This
replaces the fix from ag/377958 in a more general way.

Bug: 11293214
Change-Id: Ieb7adfcd076ff7ffe3d4d369397b2c29cf5099c3
2014-04-18 15:50:43 -07:00
Dan Stoza 017a538516 Merge "libgui: Remove unnecessary casts in SurfaceControl" 2014-04-18 20:33:52 +00:00
Dan Stoza febd4f4f46 BufferQueue: Increase max slots from 32 to 64
Increases NUM_BUFFER_SLOTS from 32 to 64 and changes the mask
returned by IGBC::getReleasedBuffers from 32 to 64 bits.

Bug: 13174352
Change-Id: Ie8ef0853916cfb91f83881c7241886bb1950f01a
2014-04-18 11:40:14 -07:00
Dan Stoza 99b18b447d BufferQueue: Add StreamSplitter
Adds a StreamSplitter class, that takes one IGraphicBufferConsumer
interface and multiple IGraphicBufferProducer interfaces and
implements a one-to-many broadcast of GraphicBuffers (while managing
fences correctly).

Change-Id: I38ecdf3e311ac521bc781c30dde0cc382a4376a3
2014-04-15 10:34:10 -07:00
Dan Stoza d9822a3843 BufferQueueProducer: add detachNextBuffer
Adds a new method, IGBP::detachNextBuffer, that effectively does
dequeue + request + detach in a single call, but does not need to
know anything about the dequeued buffer, and will not block on
dequeue. This is mostly for the upcoming StreamSplitter to use in
its onBufferReleased callback.

Change-Id: Ie88a69de109003acebaa486a5b44c8a455726550
2014-04-15 10:27:25 -07:00
Dan Stoza 7f605bd4c0 Merge "BufferQueue: Hook up IProducerListener" 2014-04-14 16:26:43 +00:00
Aravind Akella 93b84e39e6 am ef89f763: am cf818ebb: Merge "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors" into klp-modular-dev
* commit 'ef89f7638c43ce5f73e32d487bf65c3375995e3b':
  Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
2014-04-11 19:40:33 +00:00
Aravind Akella ef89f7638c am cf818ebb: Merge "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors" into klp-modular-dev
* commit 'cf818ebbf07c6a20ef48d71bf82f8d4bdf3a398c':
  Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
2014-04-11 19:34:53 +00:00
Aravind Akella cf818ebbf0 Merge "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors" into klp-modular-dev 2014-04-11 19:32:28 +00:00
Dan Stoza fd34b65f71 Merge "BufferQueue: Add producer buffer-released callback" 2014-04-11 17:57:12 +00:00
Aravind Akella 700180487f Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
This reverts commit 4369a4ebd5.

Change-Id: Ifa8619cc6873470a07a987763d818d78d4232610
2014-04-11 00:06:06 +00:00
Dan Stoza 3b3ba78c3c libgui: Remove unnecessary casts in SurfaceControl
There are a number of places where we create a local
sp<SurfaceComposerClient>& to something that is already an
sp<SurfaceComposerClient>, which is redundant. This fixes that
by removing the local references.

Bug: 13814149
Change-Id: Ic558cbda651c344e5cac97022c97563928eed29c
2014-04-10 13:50:03 -07:00
Svetoslav cf8684b206 Merge "Adding render stats APIs to UiAutomation (framework native)." 2014-04-10 19:32:44 +00:00
Svetoslav d85084b2b6 Adding render stats APIs to UiAutomation (framework native).
bug:12927198

Change-Id: Ibb1c07f7d89e11281e5c1f27f412a29ac6f9c4ab
2014-04-10 12:32:19 -07:00
Wonsik Kim 4cd47b2e0e Merge "Fix sideband stream issues" 2014-04-10 00:35:24 +00:00
Dan Stoza fb9bf8725d Merge "BufferQueue: Remove Bn version of create*" 2014-04-08 20:25:54 +00:00
Dan Stoza b3d0bdf0db BufferQueue: Remove Bn version of create*
It turns out that there's no reason to have both I* and Bn* versions
of the createBufferQueue method, so I removed the Bn* version.

Change-Id: I66aeb09e10458ae540ddf1f38d2d0154ea8f315b
2014-04-07 17:00:26 -07:00
Dan Stoza 5603a2fbbd Remove deprecated BufferQueue constructor
Bug: 13415624
Change-Id: I153b5470b21832cebe3c617d28a4ab9c9bf3b362
2014-04-07 13:41:37 -07:00
Andy McFadden fc9aeb8590 am 4215f434: am 6dbcebd0: Merge "Always release a buffer" into klp-modular-dev
* commit '4215f434187d518bf8c9807c9a18a7e0b617f7d2':
  Always release a buffer
2014-04-07 16:58:48 +00:00
Andy McFadden 4215f43418 am 6dbcebd0: Merge "Always release a buffer" into klp-modular-dev
* commit '6dbcebd0430e026fd5d99ba4b4f005bfaa9b8e2b':
  Always release a buffer
2014-04-07 16:52:13 +00:00
Wonsik Kim afe3081e0e Fix sideband stream issues
- Notify a listener when sideband stream is set
- Mark a layer as visible when sideband stream is set, even though
no buffer is queued.

Change-Id: I9652bf530f2b5ce331533ec1bb3b10a815ca191c
2014-04-07 15:59:22 +09:00
Etienne Le Grand 75b332037f am 4369a4eb: Revert "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors"
* commit '4369a4ebd5ae7567e7075bc82830b83178099ed5':
  Revert "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors"
2014-04-05 09:06:00 +00:00
Etienne Le Grand 30d6fd6b28 Revert "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors"
This reverts commit c57a019e11.

Change-Id: I3540565bc3e56a32cf3b176a29216cf68bb763b2
(cherry picked from commit 4369a4ebd5)
2014-04-05 06:13:41 +00:00
Etienne Le Grand 4369a4ebd5 Revert "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors"
This reverts commit c57a019e11.

Change-Id: I3540565bc3e56a32cf3b176a29216cf68bb763b2
2014-04-05 05:02:22 +00:00
Etienne Le Grand 33458f72e1 am 00f4dde1: am c57a019e: Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
* commit '00f4dde1aa88576811bca79bc8242e1fc1edb333':
  Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
2014-04-05 03:53:51 +00:00
Etienne Le Grand 00f4dde1aa am c57a019e: Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
* commit 'c57a019e117117c5a76c772970b26cd0f5db8c6a':
  Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
2014-04-05 01:52:28 +00:00
Etienne Le Grand c57a019e11 Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors
Change-Id: If0f3dbdb5d2e9378e1fed4614baee4e750d0c850
2014-04-04 16:31:09 -07:00
Andy McFadden 87a6784780 Always release a buffer
In GLConsumer's updateAndReleaseLocked(), we must release either
the previously-acquired buffer or the newly-acquired buffer.

Bug 13755224

Change-Id: I96adc255400ed008ba6e6ac1725ab3514c7cc8ba
2014-04-04 15:37:08 -07:00
Mark Salyzyn cece164b23 native gui: 64-bit compile issues
Change-Id: I45f605ff3759fb7ae9f0a6425d557d195f93281e
2014-04-04 10:15:54 -07:00
Wonsik Kim 9cfa49c954 Merge "Declare ownership of native_handle_t object" 2014-04-02 06:13:57 +00:00
Dan Stoza d1c1036555 BufferQueue: Hook up IProducerListener
Actually call the producer listener's callback during
IGraphicBufferConsumer::releaseBuffer

Change-Id: Idfa6bb08d62629cd3a198318e6c6fd6a731e73ef
2014-03-31 14:10:07 -07:00
Dan Stoza f0eaf25e92 BufferQueue: Add producer buffer-released callback
Add a callback to the producer side, onBufferReleased, which will be
called every time the consumer releases a buffer back to the
BufferQueue. This will enable a buffer stream splitter to work
autonomously without having to block on dequeueBuffer.

The binder object used for the callback replaces the generic IBinder
token that was passed into IGraphicBufferProducer::connect to detect
the death of the producer. If a producer does not wish to listen for
buffer release events, it can pass in an instance of the
DummyProducerListener class defined in IProducerListener.h, if it even
cares about death events (BufferQueue doesn't enforce the token being
non-NULL, though perhaps we should).

Change-Id: I23935760673524abeafea2b58dccc3583b368710
2014-03-31 14:10:07 -07:00
Dan Stoza 2443c7903c BufferQueue: Set attached buffers as requested
When a buffer is attached to the producer side, it needs to be marked
as having been requested so that it can be queued successfully.

Change-Id: I90a88b332c415a57921bd094ae635afdf65bff99
2014-03-24 15:03:46 -07:00
Wonsik Kim 0ec54e156b Declare ownership of native_handle_t object
Change-Id: I4e21ff8ea76cfafce943dc059c8f72b42397980e
2014-03-24 15:44:05 +09:00
Dan Stoza 1a0b861790 BufferQueue: Test remote producer and consumer
Adds a test that puts the BufferQueue into its own process and
connects to it over remote binder interfaces. This exposed the fact
that while IGBC was technically binderized, it didn't actually work
when flattened, so this change also fixes that.

Change-Id: I728cdb662a4273ddd3440ed6040a12560313fe68
2014-03-21 11:16:54 -07:00
Wonsik Kim 8ce5c1cc8d Merge "Fill in sideband stream caveat" 2014-03-19 00:41:23 +00:00
Dan Stoza 75555b2eaf Merge "BufferItemConsumer: Use IGBC instead of BQ" 2014-03-18 17:55:06 +00:00
Dan Stoza 14226716f2 Merge "Remove deprecated BufferQueue constructor" 2014-03-18 16:56:15 +00:00
Wonsik Kim 0ee14ca23d Fill in sideband stream caveat
Change-Id: I20db8aea8f13acf31b42db08d90b338da8a5209c
2014-03-17 17:46:53 +09:00
Jesse Hall 49bfda1fbd Fix broken build for more tests
Change-Id: I7bdd12a833233724805d01d993541ee05caa9bf6
2014-03-13 15:09:17 -07:00
Jesse Hall 73ed82f809 Merge "Add sideband streams to BufferQueue and related classes" 2014-03-13 20:28:17 +00:00
Dan Stoza 6d5a7bb970 Remove deprecated BufferQueue constructor
Bug: 13415624
Change-Id: I52f58a4d22296d9fc3cdbd4ad53eb10a785db3ce
2014-03-13 11:39:09 -07:00
Dan Stoza fe50d2a0a1 BufferItemConsumer: Use IGBC instead of BQ
Change-Id: Id1756ac62954ba412f2c23c5fa6e5d760c299347
2014-03-13 11:12:04 -07:00
Dan Stoza f522af7eb6 BufferQueue: Allow returning interfaces as I*/Bn*
This adds a second createBufferQueue method that returns
sp<IGraphicBuffer*> interfaces instead of sp<BnGraphicBuffer*>, since
most clients don't actually need the Binderized versions (but some
might).

Change-Id: Iaf4f719c96ddb6f704afc75cf52be22588173e32
2014-03-12 10:17:20 -07:00
Jesse Hall 399184a4cd Add sideband streams to BufferQueue and related classes
Sideband streams are essentially a device-specific buffer queue that
bypasses the BufferQueue system. They can be used for situations with
hard real-time requirements like high-quality TV and video playback
with A/V sync. A handle to the stream is provided by the source HAL,
and attached to a BufferQueue. The sink HAL can read buffers via the
stream handle rather than acquiring individual buffers from the
BufferQueue.

Change-Id: Ib3f262eddfc520f4bbe3d9b91753ed7dd09d3a9b
2014-03-11 12:23:14 -07:00
Dan Stoza 9f3053de78 BufferQueue: Allow detaching/reattaching buffers
Adds detachBuffer and attachBuffer calls to both the producer and
consumer sides of BufferQueue. Buffers may be detached while dequeued
by the producer or acquired by the consumer, and when attached, enter
the dequeued and acquired states, respectively.

Bug: 13173343
Change-Id: Ic152692b0a94d99e0135b9bfa62747dab2a54220
2014-03-10 16:45:38 -07:00
Andy McFadden c0c6a0cd4c Merge "FramebufferNativeWindow.h is obsolete" 2014-03-06 15:31:39 +00:00
Andy McFadden 2e336496c3 FramebufferNativeWindow.h is obsolete
This adds a deprecation #warning to the header.

Change-Id: Ia32f16e491cb01d435ec8846dda3d9a7d1a9cfc5
2014-03-05 15:42:53 -08:00
Dan Stoza c1ef3efecb Merge "Change BufferQueue into producer/consumer wrapper" 2014-03-05 18:55:13 +00:00
Dan Stoza 3e96f1982f Change BufferQueue into producer/consumer wrapper
Now that BufferQueue has been split into core + producer + consumer,
rewrite BufferQueue to be a thin layer over a producer and consumer
interface. Eventually, this layer will be deprecated in favor of
only using either the producer or consumer interface, as applicable.

Change-Id: I340ae5f5b633b244fb594615ff52ba50b9e2f7e4
2014-03-04 15:58:03 -08:00
Igor Murashkin 8be494eb09 am 1738d4fc: am 462fb3a8: Merge "gui: Fix return code assert in CpuConsumer_test."
* commit '1738d4fca78b7678d09d5c8898e1f80fa63b4a6d':
  gui: Fix return code assert in CpuConsumer_test.
2014-03-04 22:35:04 +00:00
Igor Murashkin 1738d4fca7 am 462fb3a8: Merge "gui: Fix return code assert in CpuConsumer_test."
* commit '462fb3a8d597fffef3d5534544428d5cee9d8c16':
  gui: Fix return code assert in CpuConsumer_test.
2014-03-04 21:10:33 +00:00
Igor Murashkin 462fb3a8d5 Merge "gui: Fix return code assert in CpuConsumer_test." 2014-03-04 21:05:41 +00:00
Dan Stoza 4a07dc8d21 Merge "Split BufferQueue into core + producer + consumer" 2014-03-04 20:03:59 +00:00
Dan Stoza 289ade165e Split BufferQueue into core + producer + consumer
Change-Id: Idc39f1e511d68ce4f02202d35425a419bc0bcd92
2014-03-04 09:33:14 -08:00
Igor Murashkin 0f1889efe7 gui: Surface::dequeueBuffer no locker holds mutex while blocking in binder
- This also fixes a hang in the camera service when trying to shut down
  if the producer is infinitely blocked while trying to get a new buffer.

Bug: 13250382
Change-Id: I32ca82162bb8645b97dbe084e13e05ca05529a42
2014-03-03 11:42:27 -08:00
Dan Stoza fb83d84694 Merge "Fix calls to captureScreen" 2014-02-20 02:43:37 +00:00
Dan Stoza 8d7599633f Fix calls to captureScreen
Change-Id: Ic0ff47afa29f143131906082dff79d4e907b7143
2014-02-19 18:35:30 -08:00
Andy McFadden 44c35ec4a9 Allow "opaque" flag to be updated. DO NOT MERGE
Moves the "opaque layer" from Layer to Layer::State.  This allows
it to be updated as part of a transaction.

Bug 12387406

Change-Id: I0a114ce6adf77cd12fb08f96e0691b76c475768d
2014-02-18 15:55:42 -08:00
Dan Stoza c701401f8c Allow disabling layer rotation during screenshots
Add the ability to ignore layers' transformation matrices during
screenshot capture, which will allow the window manager to capture
unrotated images for recents during the device rotation animation.

Bug: 11805195
Change-Id: I854d87bc84ca06ef9a054a454af1c080ee66fbb8
2014-02-14 23:10:42 +00:00
Andy McFadden d592f32df9 Merge "Allow "opaque" flag to be updated" 2014-01-30 21:42:02 +00:00
Andy McFadden 4125a4ffaf Allow "opaque" flag to be updated
Moves the "opaque layer" from Layer to Layer::State.  This allows
it to be updated as part of a transaction.

Bug 12387406

Change-Id: I0a114ce6adf77cd12fb08f96e0691b76c475768d
2014-01-29 17:36:49 -08:00
Dan Stoza b8072d84ba libgui: Fix segfault in SRGB tests
Make the test exit cleanly if the output buffer is never mapped.

Bug: 12761226
Change-Id: If789f02198851a17b11ee06f612f9ba7e06da754
2014-01-29 15:02:14 -08:00
Dan Stoza 6a5d35dd5c libgui: Add a test for SRGB surfaces
Add SRGBTest.RenderToSRGBSurface, which validates that passing the
SRGB colorspace attributes to eglCreateWindowSurface actually
results in an SRGB surface by comparing the output values to those
of a standard RGB surface.

Change-Id: I3d5fef8070ed8fa2357ddd1c5fcc849ae3fbd12a
2014-01-07 16:43:39 -08:00
Dan Stoza 3ed4e0b365 libgui: Add a test suite for SRGB testing
This is the start of an SRGB test suite. Currently it has a test for
SRGB texture reads in GLES3.

Change-Id: I553ee2691dc92b98cae7a003084d4e2823d40d95
2013-12-12 10:58:56 -08:00
Dan Stoza cb1fcdedaa libgui: Split SurfaceTexture tests into more files
Extract the many different test fixtures and suites in SurfaceTexture_test.cpp
into separate files. No real functional changes, just tweaking headers to keep
things building (and adding a few copyright headers I forgot last time).

Change-Id: Id801bd5d617f0cc61d22508fb9b71b41694bdecf
2013-12-09 09:52:02 -08:00
Alistair Strachan 8f76b6bedf gui: Fix return code assert in CpuConsumer_test.
The CpuConsumer error code was changed recently from INVALID_OPERATION to
NOT_ENOUGH_DATA, however the CpuConsumer_test was not updated. This change
fixes the return code checked by CpuConsumer_test so the test no longer
fails.

Change-Id: Ie548ddcb313fa34c130ac63355090cb44ac15ebf
2013-12-04 14:57:22 -08:00
Dan Stoza f3730fb8f7 libgui: Fix a couple of minor bugs, extract GLTest
Fix a couple of minor bugs in existing tests, and extract the GLTest class into
its own files.

Change-Id: I7d9570a0d3dbc9c5d7f9b13f2017607af42744b3
2013-11-26 15:48:53 -08:00
Igor Murashkin 7ea777f097 gui: Add tests for IGraphicBufferProducer
* Basic tests only. Needs more complicated queue/dequeue tests.
* Also needs consumer-side tests to really be thorough.

Change-Id: I1099dd56d65b6e9dfa15377726d6054ce657c0ca
2013-11-21 14:06:13 -08:00
Igor Murashkin 4be18a3566 gui: Remove BufferQueue::MIN_UNDEQUEUED_BUFFERS
Change-Id: I7c0cc36046dbbdb9c0e85acfe5027293d1131275
2013-11-18 12:36:15 -08:00
Igor Murashkin 7d2d160cdc gui: Update header docs for IGraphicBufferConsumer/Producer/BufferQueue
Also fix compiler warnings for libgui

Change-Id: I0ee38d9ad5eaa82d55bf812d291da8c433581cef
2013-11-13 17:34:03 -08:00
Andy McFadden 0012dbc3c6 am 251b11c2: am 85075869: Wait for buffers to drain
* commit '251b11c2045b2ae97f2ab270a65e11b4ca49b1b6':
  Wait for buffers to drain
2013-10-18 17:00:26 -07:00
Andy McFadden 251b11c204 am 85075869: Wait for buffers to drain
* commit '8507586903fa803abf535853a169913f2cf2e555':
  Wait for buffers to drain
2013-10-18 16:57:01 -07:00
Andy McFadden 8507586903 Wait for buffers to drain
When a BufferQueue producer disconnects and reconnects, we retain
the previously-queued buffers but empty the slots.  This allows
the number of queued buffers to grow without limit.  The low-memory
killer does not approve.

Bug 11069934

Change-Id: Ia2eaa954c7a3904b54209a3701dba01689e204d8
2013-10-18 23:10:16 +00:00
Aravind Akella 4a1e00fb3a am 1f1e5768: am 5d6aa951: Merge "Change API from flush(handle) to flush(). Call flush on all active sensors in the given SensorEventConnection." into klp-dev
* commit '1f1e576840d5b36a091368abb6fe6610384b6449':
  Change API from flush(handle) to flush(). Call flush on all active sensors in the given SensorEventConnection.
2013-10-10 19:26:34 -07:00
Aravind Akella 1f1e576840 am 5d6aa951: Merge "Change API from flush(handle) to flush(). Call flush on all active sensors in the given SensorEventConnection." into klp-dev
* commit '5d6aa95129a13aae37a60b3e4246a0592dab396d':
  Change API from flush(handle) to flush(). Call flush on all active sensors in the given SensorEventConnection.
2013-10-10 19:21:05 -07:00