• Home
  • History
  • Annotate
  • only in /frameworks/native/include/gui/
History log of /frameworks/native/include/gui/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6a26be7c2b1e5a84b5d2105780148016889285e6 23-Jan-2015 Lajos Molnar <lajos@google.com> CpuConsumer: lock buffers that could be YUV as ycbcr

Bug: 17906609
Change-Id: Ic71af69ec3b19ab1224ed3ad5e0a97c60e81cda6
puConsumer.h
bfd633e131585d8e924b6a77c66284ec7e5dcc72 08-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/native: Fix unused parameter warning

Pulled in in hardware/, where -Werror is used.

Change-Id: I13fc31d31fe2f623d39c84862b0c95a28813723d
(cherry picked from commit a32900deec6284973100a29f7b399d061f82b3a8)
ConsumerListener.h
8dc55396fc9bc425b5e2c82e76a38080f2a655ff 04-Nov-2014 Dan Stoza <stoza@google.com> 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
ufferItem.h
ufferQueue.h
ufferQueueProducer.h
onsumerBase.h
ConsumerListener.h
treamSplitter.h
1495ceb88594bf3c5963ef65ee12953dc0354546 08-Aug-2014 Jesse Hall <jessehall@google.com> surfaceflinger: fix -Wmismatched-tags warnings

warning: struct 'HWComposer' was previously declared as a class
[-Wmismatched-tags]

warning: class 'DisplayInfo' was previously declared as a struct
[-Wmismatched-tags]

Change-Id: I13db9f8aab3a957ce8ff8d64598dae1807d6fe7e
(cherry picked from commit 646f54105018e99ef4a30ee41f01f7d1ab66c38e)
SurfaceComposer.h
b7702c5ce7f010fa5f19646fd79f28ff04e7014b 08-Oct-2014 Jesse Hall <jessehall@google.com> Merge "BufferQueueProducer: Throttle EGL frame production." into lmp-mr1-dev
99a0afbaee9eddabc2b544e3a5c432901c1d498c 30-Sep-2014 Eric Penner <epenner@google.com> 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
ufferQueueProducer.h
8a96955c8e14db40b16164236830fc9506a00872 29-Sep-2014 Aravind Akella <aakella@google.com> 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
ensorEventQueue.h
67d8bd66aaf04805cb8f2616ba964141b865e3b9 11-Sep-2014 Lajos Molnar <lajos@google.com> 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
SurfaceComposer.h
8493b79e1cff92450076ca7450c4bf4e434a6816 09-Sep-2014 Aravind Akella <aakella@google.com> 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
ensorEventQueue.h
d15ef27f9b13727fa7358e3c09572f66bb1e0668 05-Sep-2014 Riley Andrews <riandrews@google.com> Update ScreenshotClient to take advantage of rotation in surfaceflinger's screencap api

Change-Id: I836649d9d5cd5958ce34e47f26f4a36d2d05d24c
urfaceComposerClient.h
c3ebe66b49cfba035e1fd0e160a13db38eb81b0e 05-Sep-2014 Riley Andrews <riandrews@google.com> 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
SurfaceComposer.h
9e3adfcebf28c5c76085108dffe98c74df56857d 04-Sep-2014 Aravind Akella <aakella@google.com> SensorService flush fixes.

i) Fix a possible race condition when adding a pending flush connection
to mActiveSensors data structure.
ii) Invalidate flush_complete_events as soon as they are consumed by a
connection so that they are not used by other connections which are
registered for the same sensor.

Change-Id: I1491bea8c2081c4aab1feacc60add13b7aa26bb7
ensorEventQueue.h
2d14a0ed4f5861bfa67e9db138ffdc70d2d5e6e4 26-Aug-2014 Eric Penner <epenner@google.com> 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
LConsumer.h
6c2664ae34fd582bc174d3c83e2b18e895ca2496 13-Aug-2014 Aravind Akella <aakella@google.com> SensorService fixes.

1) Flush should only be received by the app calling flush(). Maintain
a queue of all flush() calls and send flush_complete events in that
order.
2) Log warnings for older HALs. Remove batch() calls with DRY_RUN flag.
3) Reallocate event cache when more sensors register and the desired
maxCacheSize increases. Clear NEEDS_ACK flag in the buffer whenever
there is a write() failure.
4) More dump information. Add wake-up flag, maxDelay and timestamps for
sensor events.

Bug: 16874778
Change-Id: I195646191059fd31f75f2f07886c0f98bf9b509a
ensorEventQueue.h
7cb0d39016ff8061fe9fc2967870c145a6ffa2ac 30-Jul-2014 Rachad <rachad@google.com> 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
urface.h
1f6078aef71b1d3f080cd565adbec350c71088dd 27-Jun-2014 Michael Wright <michaelwr@google.com> Have VirtualDisplays send SF resize messages when resizing

Change-Id: I76d15b22099a659450ec875836c9bf2b6584838f
urfaceComposerClient.h
03414a1cfe6c1222fd7723949bd622f9cba145aa 01-Jul-2014 Riley Andrews <riandrews@google.com> Turn on support for async cursor update in surfaceflinger.

If available, surfaceflinger will use the hwc setCursorPositionAsync()
api to change the position of supported cursor layers outside of
the usual prepare/set loop.

Change-Id: Ib3fc5c0c390b3489ddbba202379840a1d2748917
SurfaceComposerClient.h
c268068c55afaaa441fda903b1b84a5b5c8a0a01 25-Jul-2014 Aravind Akella <aakella@google.com> Merge "SensorService performance improvements." into lmp-dev
56ae42613c91f6a6fb0dc3f626daa24666fd18c2 11-Jul-2014 Aravind Akella <aakella@google.com> 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
itTube.h
SensorEventConnection.h
2295687487a0f2cc3e77915d5b0fe794d3af4d20 24-Jul-2014 Eric Penner <epenner@google.com> Merge "GLProducer: Reference count images rather than buffers." into lmp-dev
78014f32da6d0ebf52fb34ebb7663863000520a0 16-Jul-2014 Antoine Labour <piman@google.com> 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 ea96044470a29133321c681080870b9d31f81a19)
ufferQueueCore.h
5c3d243fcca6d0678bcbb0461bbbe0b63f35212c 12-Jul-2014 Eric Penner <epenner@google.com> 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
LConsumer.h
1681d95989271f3a9ac0dbb93d10e4a29f2b4444 28-Jun-2014 Ruben Brunk <rubenbrunk@google.com> 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
ufferQueueProducer.h
GraphicBufferProducer.h
urface.h
dc56bf721a9f29621fd57e1d861142fa9b2d3663 30-Jun-2014 Dan Stoza <stoza@google.com> Merge "BufferQueue: Add allocateBuffers method"
ab57491de3a89a2d454d3060d36adef71741a7ae 25-Jun-2014 Dan Stoza <stoza@google.com> 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
LConsumer.h
e49ba8e2ed8e17156eb00c8fc8e2285df62bc018 24-Jun-2014 Dan Stoza <stoza@google.com> 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
LConsumer.h
29a3e90879fd96404c971e7187cd0e05927bbce0 20-Jun-2014 Dan Stoza <stoza@google.com> 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
ufferQueueProducer.h
GraphicBufferProducer.h
urface.h
adb65d9add2b7350b563d4583c5efbe3f0f0aca1 13-Jun-2014 Aravind Akella <aakella@google.com> Merge "Surface reportingMode for Sensors."
0e025c5af365e45e02cb75c1d46b46c7f4cd44cb 04-Jun-2014 Aravind Akella <aakella@google.com> Surface reportingMode for Sensors.

Change-Id: Iac8dd3408c90eb7d285a2e8043131fab3a7e58fa
ensor.h
2c9b11f0291210c9b9513a1a0cce6afebd361b3b 25-May-2014 Prashant Malani <pmalani@google.com> 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>
SurfaceComposer.h
urfaceComposerClient.h
3d5c8a98c1822e5f32f0b7e82a40f14f41769878 28-May-2014 Dan Stoza <stoza@google.com> Merge "SurfaceFlinger: Add sourceCrop to screenshot"
d9441e4c27bb7d0b1dfe2a8b5c1ee1714442648d 14-May-2014 Aravind Akella <aakella@google.com> Surface maxDelay and isWakeUpSensor flag in Sensor.java.

Change-Id: Idd1e9045190beeca87b086b272e8cbf0bed05bae
ensor.h
c18790018be5d7ea7061ccbc81f3044e74adc823 23-May-2014 Dan Stoza <stoza@google.com> 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
SurfaceComposer.h
urfaceComposerClient.h
7f7da32569f8e0b3d383a40b95f8ac1d55afd801 03-May-2014 Dan Stoza <stoza@google.com> Enable changing display configuration

This allows querying and switching display device configurations
through the ISurfaceComposer/SurfaceComposerClient interface.

Bug: 14320401
Change-Id: I8c22165698950e5da32204c1c4da92122f91a715
SurfaceComposer.h
urfaceComposerClient.h
943de2f71beff9566cc58ce5820495fd9776e1e3 24-Apr-2014 Aravind Akella <aakella@google.com> Merge "Enable wakeup sensors."
9a844cf78f09953145200b4074d47589257a408c 12-Feb-2014 Aravind Akella <aakella@google.com> 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
SensorEventConnection.h
ensor.h
ensorEventQueue.h
e0d5862ad85f7bf4feb1eee9444bf3a5b49c5842 22-Apr-2014 Dan Stoza <stoza@google.com> 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
ufferQueue.h
fb39827ebce4637dcba03770f6644cf67e932e06 21-Apr-2014 Dan Stoza <stoza@google.com> Merge "BufferQueue: Increase max slots from 32 to 64"
febd4f4f462444bfcb3f0618d07ac77e3fc1f6ad 10-Apr-2014 Dan Stoza <stoza@google.com> 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
ufferQueue.h
ufferQueueConsumer.h
ufferQueueDefs.h
GraphicBufferConsumer.h
99b18b447dec188bcec37b415603b9dd400fc7e1 28-Mar-2014 Dan Stoza <stoza@google.com> 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
GraphicBufferConsumer.h
treamSplitter.h
d9822a3843017444364899afc3c23fb5be6b9cb9 28-Mar-2014 Dan Stoza <stoza@google.com> 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
ufferQueue.h
ufferQueueProducer.h
GraphicBufferProducer.h
93b84e39e6cbb9f2ba37125465c4040e03b56048 11-Apr-2014 Aravind Akella <aakella@google.com> 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
ef89f7638c43ce5f73e32d487bf65c3375995e3b 11-Apr-2014 Aravind Akella <aakella@google.com> 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
fd34b65f717b84fa06d8c37f41b070f41d0ad3a3 11-Apr-2014 Dan Stoza <stoza@google.com> Merge "BufferQueue: Add producer buffer-released callback"
700180487ffec09d9df1657b018a7caadac24b75 08-Apr-2014 Aravind Akella <aakella@google.com> Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors

This reverts commit 4369a4ebd5ae7567e7075bc82830b83178099ed5.

Change-Id: Ifa8619cc6873470a07a987763d818d78d4232610
ensor.h
cf8684b2063c0458da634be0fae7ccabf3f50176 10-Apr-2014 Svetoslav <svetoslavganov@google.com> Merge "Adding render stats APIs to UiAutomation (framework native)."
d85084b2b65828442eafaff9b811e9b6c9ca9fad 20-Mar-2014 Svetoslav <svetoslavganov@google.com> Adding render stats APIs to UiAutomation (framework native).

bug:12927198

Change-Id: Ibb1c07f7d89e11281e5c1f27f412a29ac6f9c4ab
SurfaceComposer.h
SurfaceComposerClient.h
urfaceComposerClient.h
urfaceControl.h
b3d0bdf0dbc19f0a0d7d924693025371e24828fd 08-Apr-2014 Dan Stoza <stoza@google.com> 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
ufferQueue.h
75b332037f6197acb239bfbbf2ac09adb31e9971 05-Apr-2014 Etienne Le Grand <etn@google.com> 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"
30d6fd6b28aeacfe06ddc7adaac34e8a0032df40 05-Apr-2014 Etienne Le Grand <etn@google.com> Revert "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors"

This reverts commit c57a019e117117c5a76c772970b26cd0f5db8c6a.

Change-Id: I3540565bc3e56a32cf3b176a29216cf68bb763b2
(cherry picked from commit 4369a4ebd5ae7567e7075bc82830b83178099ed5)
ensor.h
4369a4ebd5ae7567e7075bc82830b83178099ed5 05-Apr-2014 Etienne Le Grand <etn@google.com> Revert "Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors"

This reverts commit c57a019e117117c5a76c772970b26cd0f5db8c6a.

Change-Id: I3540565bc3e56a32cf3b176a29216cf68bb763b2
ensor.h
33458f72e17be8e71f50e1f8843f7821d90934f5 05-Apr-2014 Etienne Le Grand <etn@google.com> 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
00f4dde1aa88576811bca79bc8242e1fc1edb333 05-Apr-2014 Etienne Le Grand <etn@google.com> 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
c57a019e117117c5a76c772970b26cd0f5db8c6a 25-Mar-2014 Etienne Le Grand <etn@google.com> Add stringType and requiredPermission to sensors, effectively adding permission checking for sensors

Change-Id: If0f3dbdb5d2e9378e1fed4614baee4e750d0c850
ensor.h
786e26a886a3ade95f07178ba9c1538b79d7a31a 04-Apr-2014 Greg Hackmann <ghackmann@google.com> am 3b1cb037: am 27f8840f: Merge "make struct Event layout consistent on 32/64-bit"

* commit '3b1cb037eea56dba0d134c6858f8ddc0f9743ff8':
make struct Event layout consistent on 32/64-bit
f0eaf25e9247edf4d124bedaeb863f7abdf35a3e 21-Mar-2014 Dan Stoza <stoza@google.com> 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
ufferQueue.h
ufferQueueCore.h
ufferQueueProducer.h
GraphicBufferProducer.h
ProducerListener.h
0c7c81f5a62937f79b7e734668aa997fd8df1927 20-Mar-2014 Fengwei Yin <fengwei.yin@intel.com> make struct Event layout consistent on 32/64-bit

To make struct Event have consistent memory layout between x86
and x86_64, force nsecs_t timestamp align to 64bit because it's
not true for x86.

Change-Id: I49eaddd89e10d595cf6a5130f9762b5388c96625
Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
isplayEventReceiver.h
75555b2eaf0a2b8eff30df422e041cbe80ec74ef 18-Mar-2014 Dan Stoza <stoza@google.com> Merge "BufferItemConsumer: Use IGBC instead of BQ"
14226716f2a675eee6730a405db28c674a771395 18-Mar-2014 Dan Stoza <stoza@google.com> Merge "Remove deprecated BufferQueue constructor"
8bf3b1a4964188d4ad0b96cd12174f2ba5c1eddd 18-Mar-2014 Wonsik Kim <wonsik@google.com> Merge "Revert "Implement video plane layer""
29fa9590ad32d918cb32cc88898ec53d28e1ad5a 17-Mar-2014 Wonsik Kim <wonsik@google.com> Revert "Implement video plane layer"

This reverts commit f837c93a1b392dbc4f7099d0c4fb723e32ca438e.

Change-Id: I6a1aa9ad0aca023267dc53d19c950b1535123ca7
SurfaceComposerClient.h
73ed82f809a40560fd3a6d53d18e5c846362d764 13-Mar-2014 Jesse Hall <jessehall@google.com> Merge "Add sideband streams to BufferQueue and related classes"
6d5a7bb970dd5cfd5a51fe2de7f10b9fc75732b2 13-Mar-2014 Dan Stoza <stoza@google.com> Remove deprecated BufferQueue constructor

Bug: 13415624
Change-Id: I52f58a4d22296d9fc3cdbd4ad53eb10a785db3ce
urfaceComposerClient.h
fe50d2a0a13116238d5321e16c06e6ed533618dc 12-Mar-2014 Dan Stoza <stoza@google.com> BufferItemConsumer: Use IGBC instead of BQ

Change-Id: Id1756ac62954ba412f2c23c5fa6e5d760c299347
ufferItemConsumer.h
f522af7eb6048c2efae77d7b94960bc49c003e0e 12-Mar-2014 Dan Stoza <stoza@google.com> 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
ufferQueue.h
399184a4cd728ea1421fb0bc1722274a29e38f4a 04-Mar-2014 Jesse Hall <jessehall@google.com> 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
ufferQueue.h
ufferQueueConsumer.h
ufferQueueCore.h
ufferQueueProducer.h
onsumerBase.h
ConsumerListener.h
GraphicBufferConsumer.h
GraphicBufferProducer.h
urface.h
9f3053de78630815d60cf48a2cf2348cc5867c45 07-Mar-2014 Dan Stoza <stoza@google.com> 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
ufferQueue.h
ufferQueueConsumer.h
ufferQueueProducer.h
ufferSlot.h
GraphicBufferConsumer.h
GraphicBufferProducer.h
3e96f1982fda358424b0b75f394cbf7c1794a072 03-Mar-2014 Dan Stoza <stoza@google.com> 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
ufferQueue.h
ufferQueueConsumer.h
ufferQueueCore.h
ufferQueueDefs.h
ufferQueueProducer.h
289ade165e60b5f71734d30e535f16eb1f4313ad 28-Feb-2014 Dan Stoza <stoza@google.com> Split BufferQueue into core + producer + consumer

Change-Id: Idc39f1e511d68ce4f02202d35425a419bc0bcd92
ufferItem.h
ufferQueueConsumer.h
ufferQueueCore.h
ufferQueueProducer.h
ufferSlot.h
f837c93a1b392dbc4f7099d0c4fb723e32ca438e 24-Feb-2014 Wonsik Kim <wonsik@google.com> Implement video plane layer

Binding with video source will follow.

Change-Id: Ic14e9757f5b61f4055cbeda47c1bafae0a621abb
SurfaceComposerClient.h
c701401f8cec2e5309f8b57e2b97baced5093274 15-Feb-2014 Dan Stoza <stoza@google.com> 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
SurfaceComposer.h
urfaceComposerClient.h
7ea777f097784492f880623067becac1b276f884 19-Nov-2013 Igor Murashkin <iam@google.com> 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
ufferQueue.h
GraphicBufferProducer.h
4be18a3566c5d902b7fe94db4cf14b174ed7beb5 18-Nov-2013 Igor Murashkin <iam@google.com> gui: Remove BufferQueue::MIN_UNDEQUEUED_BUFFERS

Change-Id: I7c0cc36046dbbdb9c0e85acfe5027293d1131275
ufferItemConsumer.h
ufferQueue.h
7d2d160cdc3cba9f4454f38433c94b68376cb843 13-Nov-2013 Igor Murashkin <iam@google.com> gui: Update header docs for IGraphicBufferConsumer/Producer/BufferQueue

Also fix compiler warnings for libgui

Change-Id: I0ee38d9ad5eaa82d55bf812d291da8c433581cef
ufferQueue.h
GraphicBufferConsumer.h
GraphicBufferProducer.h
701166d9f60a6e1149ff568aec0e03f3f3925292 08-Oct-2013 Aravind Akella <aakella@google.com> Change API from flush(handle) to flush(). Call flush on all active sensors in the given SensorEventConnection.

Change-Id: I4ef2bec80406c517903ab9782dc9eaf3fa8b7f36
SensorEventConnection.h
ensorEventQueue.h
dbe9245e2e362b12e184cd33b9a27b0901f81244 24-Sep-2013 Jamie Gennis <jgennis@google.com> GLConsumer: start using EGL_ANDROID_image_crop

This change makes GLConsumer use the EGL_ANDROID_image_crop extension when
available on a device. The crop rectangle is passed to the EGL driver when
creating EGLImages, allowing the crop to be performed by the driver rather than
using the texture transform matrix.

Bug: 10897141
Change-Id: I63e9a5d5c85067376abc420e3639154468346311
LConsumer.h
d171da973de3c6b30263011334fdcd916739144f 19-Sep-2013 Eino-Ville Talvala <etalvala@google.com> GLConsumer: Add query for current frame number.

Surface the underlying frame number of the current texture.

Bug: 10830400
Change-Id: Ide3a7da12ea0aac54588beb6bf00dbfe2cd37653
LConsumer.h
c1c05de415854eb7a13a16b7e22a22de8515123a 18-Sep-2013 Mathias Agopian <mathias@google.com> fix camera API 2.0 orientation

we add a flag to ANativeWindow::setBufferTransform that means
"apply the inverse rotation of the display this buffer is displayed
onto to".

Bug: 10804238
Change-Id: Id2447676271950463e8dbcef1b95935c5c3f32b2
GraphicBufferConsumer.h
365857df8b94c959dea984a63013f6e7730ef976 12-Sep-2013 Mathias Agopian <mathias@google.com> Make sure do disconnect from a BQ when its client dies.

Bug: 5679534

Change-Id: If447e8673df83fe0b1d6210641e0a48522501a53
ufferQueue.h
GraphicBufferProducer.h
90ed3e8d7883d9c80fb8bf11b1c593bd8b2b39d0 10-Sep-2013 Mathias Agopian <mathias@google.com> fix a few problems with BitTube

BitTube used to send objects one at a time and didn't
handle errors properly.

We now send all the objects in one call, which means they
have to be read as a single batch as well. This changes the
BitTube API.

Update SensorService to the new API.

Also added an API to set the size of the send buffer.

Bug: 10641596
Change-Id: I77c70d35e351fdba0416fae4b7ca3b1d56272251
itTube.h
ensorEventQueue.h
724d91d778e71c8186399f4955de14b54812b3ed 27-Jun-2013 Aravind Akella <aakella@google.com> Sensor batching. Changes to the native code.

Bug: 10109508
Change-Id: I7333f3aac76125a8226a4c99c901fb904588df04
SensorEventConnection.h
ensor.h
ensorEventQueue.h
3c25621ad7d13f64d3ab95a27fa970fbc9998f73 16-Aug-2013 Andy McFadden <fadden@android.com> Re-enable frame dropping for non-auto timestamps

This change adds an entire field to note whether the timestamp was
auto-generated by Surface or supplied by the application.

The value is used when deciding whether or not to drop frames based
on buffer presentation timestamps. If a desired presentation time
was set explicitly, BufferQueue will use that value to decide if a
frame should be dropped. If the timestamp was generated by Surface
at the time the buffer was queued, the timestamp is ignored.

Bug 10151804

Change-Id: Ibd571a7578351063b813cbdad2ddbeed70655ba5
GraphicBufferConsumer.h
GraphicBufferProducer.h
a5b7513711555c8681eb9391cfafe30fb7d6dd3d 15-Aug-2013 Igor Murashkin <iam@google.com> gui: CpuConsumer::lockNextBuffer change return code when too many bufs acquired

- Return NOT_ENOUGH_DATA instead of INVALID_OPERATION when too many
buffers have already been locked.
- INVALID_OPERATION is nominally used when something irrecoverable happens,
but in this case the client just needs to call unlockBuffer to go back into a
good state.

Bug: 10333400
Change-Id: I3a034d77de85741429f832a90eedd670afa1dc94
puConsumer.h
3f84483382be2d528918cc1a6fbc6a7d68e0b181 08-Aug-2013 Mathias Agopian <mathias@google.com> SurfaceFlinger now uses GLES 2.x when available

Bug: 8679321

Change-Id: I2b152d01fb4e2de2ea9fe87f1ddbd6826d7520d7
LConsumer.h
urface.h
45155969dc747d09d267cd1f22baf0eaf886a801 09-Aug-2013 Mathias Agopian <mathias@google.com> make sure GLConsumer::releaseTexImage() works after detachFromContext()

Change-Id: I27e0bc57e927d47b2b98113ee37b5396bcc72019
LConsumer.h
9870c9b66cc73ee31aabba23aa06deaf673ee5ef 09-Aug-2013 Mathias Agopian <mathias@google.com> make GLConsumer's debug texture static

this is so that we don't burn a gralloc handle and a bit
of memory per GLConsumer.

Change-Id: I30c3e7ec45d7f1b5426aca8e06c7716870877706
LConsumer.h
6c913be9ca95fd6b556d056e165a4ba6dc69795b 08-Aug-2013 Jesse Hall <jessehall@google.com> Add ISurfaceComposer::destroyDisplay

Bug: 10191053
Change-Id: Ia89286f95421344a60ffedaaca5825c4e3cd7f9e
SurfaceComposer.h
urfaceComposerClient.h
3ca76f416bc8665a97636ca8a2d0128b9da9d92c 07-Aug-2013 Mathias Agopian <mathias@google.com> remove support for glReadPixels screenshot path

this was only needed on some chipset we're not
supporting in KLP.

Change-Id: I2e8fc07f135030bd61d2e241a8e426f1a4316425
SurfaceComposer.h
db89edc94bd2a78226b407f9f7261e202e7fa325 02-Aug-2013 Mathias Agopian <mathias@google.com> All consumers now take an IGraphicBufferConsumer instead of a BufferQueue

this means they only have access to the consumer end of
the interface. we had a lot of code that assumed consumers
where holding a BufferQueue (i.e.: both ends), so most of
this change is untangling in fix that

Bug: 9265647
Change-Id: Ic2e2596ee14c7535f51bf26d9a897a0fc036d22c
ufferItemConsumer.h
ufferQueue.h
onsumerBase.h
puConsumer.h
LConsumer.h
GraphicBufferConsumer.h
urfaceComposerClient.h
a4e19521ac4563f2ff6517bcfd63d9b8d33a6d0b 01-Aug-2013 Mathias Agopian <mathias@google.com> Binderize the consumer side of BufferQueue

While currently untested, this should allow to move the
BuffereQueue in the consumer process and have everything
work as usual.

Bug: 9265647

Change-Id: I9ca8f099f7c65b9a27b7e7a3643b46d1b58eacfc
ufferQueue.h
onsumerBase.h
ConsumerListener.h
GraphicBufferConsumer.h
e142428a9c8b9d2380032cd4d7b55ee440fe8770 30-Jul-2013 Mathias Agopian <mathias@google.com> Make Flattenable not virtual

Fallout from the Flattenable change, update all its uses.

Additionnaly, fix/tighten size checks when (un)flatten()ing
things.

Removed the assumption by some flattenables (e.g.: Fence)
that the size passed to them would be exact (it can
and will be larger in some cases)

The code in Parcel is a bit complicated so that we don't
have to expose the full implementation (and also to
keep the code smallish).

Change-Id: I0bf1c8aca2a3128491b4f45510bc46667e566dde
GraphicBufferProducer.h
ensor.h
ad678e18b66f495efa78dc3b9ab99b579945c9e2 24-Jul-2013 Mathias Agopian <mathias@google.com> single buffer mode for BufferQueue

Bug: 9891035
Change-Id: Id1ab5f911a6dc4c1d8235e65775b3d3635231ad4
ufferQueue.h
LConsumer.h
7cdd786fa80cf03551291ae8feca7b77583be1c5 19-Jul-2013 Mathias Agopian <mathias@google.com> Make ANW.setSwapInterval(0) work again

we can now queue/dequeue a buffer in asynchrnous mode by using the
async parameter to these calls. async mode is only specified
with those calls (it is not modal anymore).

as a consequence it can only be specified when the buffer count
is not overidden, as error is returned otherwise.

Change-Id: Ic63f4f96f671cb9d65c4cecbcc192615e09a8b6b
ufferQueue.h
GraphicBufferProducer.h
urface.h
a3fbda3cef04d51a35a3eb64b2f744a989800856 19-Jul-2013 Mathias Agopian <mathias@google.com> BuffferQueue disconnect is now always asynchrnous

we tag queued buffers with the "bufferqueue cannot block" flag
and use that bit to discard a buffer in the queue by new ones
comming in. this allows us to remove the buffer queue drain in
disconnect while maintaining the right behaviour if it gets
connected again (since each buffer remembers how it was enqueued).

Change-Id: I1e703d363a687b70b19ba49cef32213116e8bd3f
ufferQueue.h
595264f1af12e25dce57d7c5b1d52ed86ac0d0c9 17-Jul-2013 Mathias Agopian <mathias@google.com> BufferQueue improvements and APIs changes

this is the first step of a series of improvements to
BufferQueue. A few things happen in this change:

- setSynchronousMode() goes away as well as the SynchronousModeAllowed flag
- BufferQueue now defaults to (what used to be) synchronous mode
- a new "controlled by app" flag is passed when creating consumers and producers
those flags are used to put the BufferQueue in a mode where it
will never block if both flags are set. This is achieved by:
- returning an error from dequeueBuffer() if it would block
- making sure a buffer is always available by replacing
the previous buffer with the new one in queueBuffer()
(note: this is similar to what asynchrnous mode used to be)

Note: in this change EGL's swap-interval 0 is broken; this will be
fixed in another change.

Change-Id: I691f9507d6e2e158287e3039f2a79a4d4434211d
ufferItemConsumer.h
ufferQueue.h
onsumerBase.h
puConsumer.h
ummyConsumer.h
LConsumer.h
GraphicBufferProducer.h
urface.h
8f938a53385a3c6d1c6aa24b3f38437bb2cc47ae 13-Jul-2013 Mathias Agopian <mathias@google.com> always pass the BufferQueue explicitely to consumers

Change-Id: I883b0a7b19d8e722f9ab714ba6f49e658b02ca86
ufferItemConsumer.h
puConsumer.h
LConsumer.h
1585c4d9fbbba3ba70ae625923b85cd02cb8a0fd 28-Jun-2013 Andy McFadden <fadden@android.com> Pay attention to buffer timestamps

When acquiring a buffer, SurfaceFlinger now computes the expected
presentation time and passes it to the BufferQueue acquireBuffer()
method. If it's not yet time to display the buffer, acquireBuffer()
returns PRESENT_LATER instead of a buffer.

The current implementation of the expected-present-time computation
uses approximations and guesswork.

Bug 7900302

Change-Id: If9345611c5983a11a811935aaf27d6388a5036f1
ufferItemConsumer.h
ufferQueue.h
onsumerBase.h
LConsumer.h
b4b63704c02319765625de360a140ef8a59ab43b 06-Jun-2013 Zhijun He <zhijunhe@google.com> CpuConsumer: Add set buffer size and format functions.

Add setDefaultBufferSize() and setDefaultBufferFormat(). ImageReader JNI need
them.

Bug: 9254294
Change-Id: I7d2464d43b0ca73fbb834ed22cecbfbb30eef60c
puConsumer.h
ae772278fe52335b730442f3d86307787dea807e 03-Jun-2013 Zhijun He <zhijunhe@google.com> CpuConsumer: Remove CpuConsumer JNI ID.

Not used anywhere, and it is pretty confusing to have it here.

Bug: 9254294
Change-Id: I12b761532918b546a0f56c74ccf81b2c119ccd66
puConsumer.h
9e3cb55b8f6f007906872decfe3b8a2541e94dd2 07-May-2013 Lajos Molnar <lajos@google.com> BufferQueue: remove freeAllBuffersExceptHeadLocked()

Now that we are having separate buffer-instances for the buffer-
queue, we can free all buffers; we don't have to keep the head
alive.

Change-Id: I023e9161a2501d99333f8868ce438afa914ec50f
Signed-off-by: Lajos Molnar <lajos@google.com>
Related-to-bug: 7093648
ufferQueue.h
c5d7b7d323bba8772a9005f7d300ad983a04733a 03-May-2013 Lajos Molnar <lajos@google.com> BufferQueue: track buffer-queue by instance vs. by reference

Instead of representing the buffer-queue as a vector of buffer
indices, represent them as a vector of BufferItems (copies).
This allows modifying the buffer slots independent of the queued
buffers.

As part of this change, BufferSlot properties that are only
been relevant in the buffer-queue have been removed.

Also, invalid scalingMode in queueBuffer now returns an error.

ConsumerBase has also changed to allow reuse of the same
buffer slots by different buffers.

Change-Id: If2a698fa142b67c69ad41b8eaca6e127eb3ef75b
Signed-off-by: Lajos Molnar <lajos@google.com>
Related-to-bug: 7093648
ufferQueue.h
onsumerBase.h
LConsumer.h
d487ca1ab331e60956c7819265723676b25b7fba 09-May-2013 Eino-Ville Talvala <etalvala@google.com> am 87ab83d9: am f743e3db: Merge "Add support for HAL_PIXEL_FORMAT_YCbCr_420_888" into jb-mr2-dev

* commit '87ab83d96b9d826e94a7169a6205bcf9c2ee633a':
Add support for HAL_PIXEL_FORMAT_YCbCr_420_888
c43946b931de5dafd28f49963f9af78e05390b26 05-May-2013 Eino-Ville Talvala <etalvala@google.com> Add support for HAL_PIXEL_FORMAT_YCbCr_420_888

- Add fields to CpuConsumer::LockedBuffer for new information
- New lock methods for GraphicBuffer and GraphicBufferMapper for
the format

Bug: 8734880
Change-Id: If31f82c62d64b6942cf4cc6e5715585c03273f12
puConsumer.h
bdcf1fe2ba4f6fe2eb63a5ec8246b1582b638e04 24-Apr-2013 Mathias Agopian <mathias@google.com> Merge changes I0d9f18d1,Ib96c9161

* changes:
Add a --color option to dumpsys SurfaceFlinger
clean-up/simplify all dump() APIs
74d211ae26a0257c6075a823812e40b55aa1e653 22-Apr-2013 Mathias Agopian <mathias@google.com> clean-up/simplify all dump() APIs

remove the scratch buffer parameter and use
String8::appendFormat() instead.

Change-Id: Ib96c91617c8e7292de87433d15cf6232b7d591b0
ufferQueue.h
onsumerBase.h
LConsumer.h
e692ab9a6be63193c5b52a6562d85d06c40463b8 22-Apr-2013 Mathias Agopian <mathias@google.com> fix uninitialized variables in GLConsumer

mDefaultWidth, mDefaultHeight and mCurrentScallingMode are now
initialized to the same default value that BufferQueue uses.

Change-Id: I0d4da2022b06419d12745716d8ddbd48c8869953
LConsumer.h
187edf93c6245bb8fb3187c49f2174492ed6e049 17-Apr-2013 Igor Murashkin <iam@google.com> Merge "BufferItemConsumer: add functions to set default buffer format/size" into jb-mr2-dev
87d1e3427b536b5cb1123ddc357539cb4075687a 16-Apr-2013 Igor Murashkin <iam@google.com> BufferItemConsumer: add functions to set default buffer format/size

Bug: 8629088
Change-Id: I06f2e26a70d6dbcfcd70b08b4461e8e401f6e83f
ufferItemConsumer.h
53dc9044bfe17039592faf4660c5bf715e8120ad 11-Apr-2013 Andy McFadden <fadden@android.com> Merge "Updated comments" into jb-mr2-dev
ad669b04f4633957eea55b8ad2d8253adcefe39b 06-Apr-2013 Jamie Gennis <jgennis@google.com> libgui: fix an EGLImage leak

This moves the call to ConsumerBase::abandon from the ConsumerBase dtor to
ConsumerBase::onLastStrongRef. The abandon call relies on virtual methods to
perform the clean-up, so calling it from the ConsumerBase dtor after the
derived classes dtors ran was skipping some of the clean-up. The
onLastStrongRef method should get called just before the most derived class's
dtor gets called.

Bug: 8349135
Change-Id: I836946826927cc1ed69c049049f525f92b17a269
onsumerBase.h
753e3415cdaa99f9453d1ea71b163bf1b148e127 05-Apr-2013 Andy McFadden <fadden@android.com> Updated comments

Updated many comments. Added one minor error check.

Change-Id: Ib935dd99d417bada91d2e198008a50dd94269316
ufferQueue.h
ca08833d5ea99130797e10ad68a651b50e99da74 29-Mar-2013 Mathias Agopian <mathias@google.com> don't use compile-time configuration of libgui as much as possible

We now detect at runtime which sync features to use, which
allows us to remove a lot of the compile-time configuration
options. There is still one option though, to disable
KHR_fence_sync on some devices (which are more efficient
without it).

- added a backdoor to get the vendor's EGL strings

the new logic is:
- use always ANDROID_native_fence_sync if available
- fallback to KHR_fence_sync if available and not disabled
by the compile-time option
- use KHR_wait_sync if available and either of the above is
enabled

Change-Id: I9c4b49d9ff1151faf902cc93bd53ea5f205aaabf
LConsumer.h
8000d0694bc34bc17d869da546d8ff8790ae7be4 27-Mar-2013 Mathias Agopian <mathias@google.com> make sure to unlock the screenshot's buffer on destruction

this fixes a memory leak on various devices

Bug: 8475134
Change-Id: I25924674c803a0cb22371a95c60664c36acb0340
urfaceComposerClient.h
13f01cbdbd34779a234bc674df79e23672fd5c0b 20-Mar-2013 Jesse Hall <jessehall@google.com> Pass sp<Fence>s around instead of file descriptors

Change-Id: Iac70584a2207940730e8f803a543e4e9a4000c47
LConsumer.h
aaebffd52f1bfa3d239bba0d60b699c01c6d791c 21-Mar-2013 Eino-Ville Talvala <etalvala@google.com> Merge "CpuConsumer: Properly track acquired buffers" into jb-mr2-dev
ac006439bb635cd99d8dcbefe95fa680e21519b5 21-Mar-2013 Ramanan Rajeswaran <ramanan@google.com> Merge "Revert "Revert "Change SurfaceControl setPosition to take floats""" into jb-mr2-dev
d6480c020b050c777ec1db2dd9c16fccfc47b47b 21-Mar-2013 Ramanan Rajeswaran <ramanan@google.com> Revert "Revert "Change SurfaceControl setPosition to take floats""

This reverts commit bbb57f3331c7182399ed82e9c4f93a965677dde3

Change-Id: Ib8f039f530d6b8175b5205c6c0008b135d4001a2
urfaceControl.h
abe815dd6978b718c04f6e22e1a893d2b51d11a1 20-Mar-2013 Mathias Agopian <mathias@google.com> rework how we take screenshots for a CPU consumer

We're not using IMemoryHeap as a transport anymore,
instead we're providing a CpuConsumer and use the
IGraphicBufferProducer version of the screenshot API.

However, some GPU drivers don't support properly
a GPU to CPU path, to work around this, we use a
temporary BufferQueue on the server side for the
GL rendering, and we use glReadPixels into the
CpuConsumer (we're now using a CPU to CPU path
which is always supported).

Currently this "wrapping" is always performed,
but it can be bypassed on devices that support
the GPU to CPU path.

This also addresses a DoS attack vector on
SurfaceFlinger, where an application could
consume all of SF's filedescriptors by creating
a lot of screenshots in a row.

Bug: 8390553

Change-Id: I9e81514c2a7711b9bb393f74305be7d2abe08f1c
SurfaceComposer.h
urfaceComposerClient.h
fae23b8757a6e1b70997db28a2eaf34f9ddc9b84 19-Mar-2013 Jesse Hall <jessehall@google.com> Merge changes I61ae54f3,I57cb668e,I7a3f1e1a,Id28a2f9b into jb-mr2-dev

* changes:
Add BufferQueueInterposer and use it for virtual displays
Add DisplaySurface abstraction
Fix argument types in IGraphicBufferProducer methods
Minor cleanups/fixes before virtual display refactoring
4c00cc11141da7d159eb2323b186ed344115c0f1 16-Mar-2013 Jesse Hall <jessehall@google.com> Fix argument types in IGraphicBufferProducer methods

Bug: 8384764
Change-Id: I7a3f1e1a0584a70af04f9eafef900505389d2202
ufferQueue.h
GraphicBufferProducer.h
7adb0f8a9fdb961692ffd2f0c65cacb155143f64 07-Mar-2013 Jesse Hall <jessehall@google.com> Minor cleanups/fixes before virtual display refactoring

None of these should change behavior, except for removing some
incorrect log messages when using a virtual display.

- HWComposer::getAndResetReleaseFenceFd() checks the HWC version, so
no need to do that in the DisplayDevice::onSwapBuffersCompleted().
However, it should check that mFramebufferSurface is not NULL like
it is for virtual displays.
- Comment that FramebufferSurface::dump() overrides the non-virtual
ConsumerBase::dump(), and fix it so the right thing happens
regardless of the static type of the pointer/reference the callee
has. FramebufferSurface::dump() could be removed right now, but I'd
need to bring it back in a later change.
- Use the right enum for validating display type ids.
- Don't try to send hotplug events for virtual displays.
- Mark virtual displays as connected so HWComposer::prepare() doesn't
think something is wrong when it gets a non-NULL layer list.
- Remove unused FramebufferSurface methods.

Bug: 8384764
Change-Id: Id28a2f9be86b45f4bb7915fdf7752157035f4294
onsumerBase.h
041a075262ef5fc886e46fd4eec3dd79ee2e60c0 16-Mar-2013 Mathias Agopian <mathias@google.com> don't allow screenshots without the READ_FRAMEBUFFER permission

the recent screenshot rework allowed the older screenshot
interface to work without that permission

Change-Id: I6c4743f4591c81106e3b823d55a055f7b4907de1
SurfaceComposer.h
35ffa6a868f1aa650c90956a4129bb70f780fc99 13-Mar-2013 Mathias Agopian <mathias@google.com> Surface can now be created only from an IGraphicBufferProducer

it can't write itself to a parcel, nor can it be created from a
parcel.

Change-Id: I69165d5c54d6024b3e546e80d8b57e3dedda7893
urface.h
4d9b822e2c18142e55fe2611aa6cd7dc7d4a62c6 13-Mar-2013 Mathias Agopian <mathias@google.com> get rid of ISurface

ISurface was only used to get the IGraphicBufferProducer from
a Layer. It's now replaced by a BBinder subclass / IBinder and
is only used as a handle to the surface, to both refer to it
and manage its life-time.

Also cleaned-up a bit the ISurfaceComposer interface and
"create layer" code path.

Change-Id: I68d0e02d57b862cffb31d5168c3bc10cea0906eb
Surface.h
SurfaceComposerClient.h
urfaceControl.h
089a15298e045598bf15fd2a46284c34dd56384c 05-Mar-2013 Mathias Agopian <mathias@google.com> Remove support for ScreenshotLayer

Change-Id: I5b571a4cf3faa77d2c4aca916fa4bd00a1065bb9
SurfaceComposerClient.h
042ecee2abf8584585f1f22f661ac6be9689edf4 01-Mar-2013 Eino-Ville Talvala <etalvala@google.com> CpuConsumer: Properly track acquired buffers

CpuConsumer cannot simply assume a slot's buffer is the same buffer
between acquire and release, and therefore it could be possible for
the same slot to get used for a second acquired buffer, if there's a
producer disconnect in between. This would cause a problem when the
first buffer is released by the consumer.

Instead, use an independent list of acquired buffers to properly track
their state.

Bug: 8291751
Change-Id: I0241ad8704e53d47318c7179b13daed8181b1fab
puConsumer.h
306f18c5fb15ac05db09ece7241af02b9713a23d 05-Mar-2013 Mathias Agopian <mathias@google.com> Merge "rework screenshot API and implementation" into jb-mr2-dev
2a9fc493dfdba67108e4335bb1fe931bc1e2a025 01-Mar-2013 Mathias Agopian <mathias@google.com> rework screenshot API and implementation

- SurfaceFlinger now supports to take a screenshot
directly into an IGraphicBufferProducer

- reimplement the IMemoryHeap screenshot on top
of the above

- reimplement LayerScreenshot such that its
BufferQueue is directly used as the destination
of the screenshot. LayerScreenshot is now a thin
wrapper around Layer

Bug: 6940974

Change-Id: I69a2096b44b91acbb99eba16f83a9c78d94e0d10
SurfaceComposer.h
urfaceComposerClient.h
bbb57f3331c7182399ed82e9c4f93a965677dde3 01-Mar-2013 Dave Burke <daveburke@google.com> Revert "Change SurfaceControl setPosition to take floats"

Temporary, to fix weekend build, until we get Nvidia code drop.

This reverts commit 9a867a8798fa6ea21f6341db31e38ea64fde6c83

DO NOT MERGE

Change-Id: I7b5dbc4db46ef3d97dc8598057d5487d6971178b
urfaceControl.h
eb0d12963d271052c24abb025d698504df9e7573 28-Feb-2013 Eino-Ville Talvala <etalvala@google.com> CpuConsumer: Add optional asynchronous mode

Bug: 8290146
Bug: 8291751

Change-Id: I9c8ac4bff38b0411e987a204e540d018dba6d0b4
puConsumer.h
64d8b1903e4b5f2838818eedcf4fef748b38709c 28-Feb-2013 Eino-Ville Talvala <etalvala@google.com> CpuConsumer: Don't unlock buffers on producer disconnect

Bug: 8291751

Change-Id: I062a3d34b41183d07fb6b9109cdb6bf0c0c75672
puConsumer.h
9a867a8798fa6ea21f6341db31e38ea64fde6c83 22-Feb-2013 Michael Wright <michaelwr@google.com> Change SurfaceControl setPosition to take floats

Bug: 8153162
Change-Id: If3c4b7a3e124ace25999eb9a569dc9a806a1fbc2
urfaceControl.h
cf0b8c85fb0106751256dba7821f86b5ad03126c 20-Feb-2013 Mathias Agopian <mathias@google.com> get rid of Surface::getISurfaceTexture()

this was there just for legacy reasons.

Change-Id: I0a48d6e04d7efa65033f9f10c91bba557f16ae8b
urface.h
c4905eb49d20667381f3cda7c6f6894234404bd3 16-Feb-2013 Mathias Agopian <mathias@google.com> fix build: SurfaceTextureClient to Surface rename

Change-Id: I0041e6f49bc637bc52161c83f0bd44101246f480
urface.h
f25c5086cf46eb029d887f34f25a09220e44958c 15-Feb-2013 Mathias Agopian <mathias@google.com> fix build: SurfaceTextureClient to Surface rename

Change-Id: I54d68241f1080eef640aefe71f33912ad79345ef
urface.h
e3c697fb929c856b59fa56a8e05a2a7eba187c3d 15-Feb-2013 Mathias Agopian <mathias@google.com> Refactoring: Rename SurfaceTextureClient to Surface

Change-Id: Ibed34175ae273608393aaa5f0a7df207dc40d709
GraphicBufferProducer.h
urface.h
urfaceComposerClient.h
urfaceControl.h
urfaceTextureClient.h
6d9b9dfd555ee2bc1dd8381dde95d45f9500b3ca 14-Feb-2013 Mathias Agopian <mathias@google.com> remove access ANDROID_VIEW_SURFACE_JNI_ID

Change-Id: I0ef474ed9be2cd26fa520ef871ffcf21a25e4994
urface.h
urfaceComposerClient.h
ac9fa427d4a86745e60a5f7fd8e3ea340c4db907 12-Feb-2013 Mathias Agopian <mathias@google.com> get rid of Surface identity and token

we use the IBinder instead.

Change-Id: I4aa0b58869ba43f19980013620051e5a261b062d
Surface.h
SurfaceComposerClient.h
urface.h
urfaceComposerClient.h
882e3a39ed770b335a203e233b57127fde1c839e 09-Jan-2013 Andy McFadden <fadden@android.com> Add some comments.

Also, minor tweak to SurfaceTextureLayer.

Change-Id: If616d5ee4e8226dd0e16c5dbb0e0f80db553110e
SurfaceComposer.h
urface.h
urfaceTextureClient.h
466a192d2088f9238d34597d1aa28da41367c1ca 08-Jan-2013 Andy McFadden <fadden@android.com> Minor tweaks.

Change-Id: I9f82f574112141b6aa074c42303056cd52d5c478
GraphicBufferProducer.h
2adaf04fab35cf47c824d74d901b54094e01ccd3 18-Dec-2012 Andy McFadden <fadden@android.com> Rename ISurfaceTexture and SurfaceTexture

The C++ class names don't match what the classes do, so rename
ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to
GLConsumer.

Bug 7736700

Change-Id: Ia03e468888025b5cae3c0ee1995434515dbea387
ufferItemConsumer.h
ufferQueue.h
onsumerBase.h
puConsumer.h
ummyConsumer.h
LConsumer.h
GraphicBufferProducer.h
Surface.h
SurfaceComposer.h
SurfaceTexture.h
urface.h
urfaceComposerClient.h
urfaceTexture.h
urfaceTextureClient.h
0273adbf0bc202eda2ca579ae0773464ea9c701f 13-Dec-2012 Andy McFadden <fadden@android.com> Added some comments

Added a quick intro section at the top of the class. Also noted
the proposed new name for the class.

Change-Id: I3f79663527544aa4e910db0e5a1374b54d16ba2f
SurfaceTexture.h
urface.h
urfaceTexture.h
urfaceTextureClient.h
3c1ada982202d97ecd0a9a542b5373e2d78658fb 12-Dec-2012 Jamie Gennis <jgennis@google.com> Merge "SurfaceTextureClient: remove a deprecated ctor"
4def8600305bc2b7f947c9fc0811095b7c17c8e2 12-Dec-2012 Jamie Gennis <jgennis@google.com> SurfaceTextureClient: remove a deprecated ctor

Change-Id: Ibf2746fdca26851677cd90199c60eab80f6d0c73
urfaceTextureClient.h
c6f04666c205a72add3c856455bf212f0c84d6fc 12-Dec-2012 Jamie Gennis <jgennis@google.com> Merge "SurfaceFlinger: Move GraphicBufferAlloc to libgui"
392edd88cb63d71a21a86a02cf9c56ac97637128 30-Nov-2012 Jamie Gennis <jgennis@google.com> SurfaceFlinger: Move GraphicBufferAlloc to libgui

This change moves the GraphicBufferAlloc class from SurfaceFlinger to libgui.

Change-Id: Idf31d2004efa2651b60590733f73c4a7b831e8a9
raphicBufferAlloc.h
97eba8904c2f221c42a9473407223a4c3a213f75 12-Dec-2012 Andy McFadden <fadden@android.com> Avoid unnecessary texture bind

In SurfaceFlingerConsumer, check to see if native fence sync is
enabled. If so, defer the texture binding step to Layer::onDraw.

Change-Id: I7d4034a31c0143207eea2509dfa13ef3820f9b8c
urfaceTexture.h
bf974abe92f7495529916fe0f483f3b56e7c30e3 05-Dec-2012 Andy McFadden <fadden@android.com> Refactor SurfaceTexture a bit.

Rearranges updateTexImage() so that the SurfaceFlinger-specific
behavior is in a new SurfaceFlingerConsumer subclass.

SurfaceTexture behavior should not be altered. Instead of
acquire-bind-release we now do acquire-release-bind, but since
it's all done with the lock held there shouldn't be any
externally-visible change.

Change-Id: Ia566e4727945e2cfb9359fc6d2a8f8af64d7b7b7
ufferQueue.h
urfaceTexture.h
a4a3149a36bc69a06e4824aeae909ab910661070 29-Oct-2012 Igor Murashkin <iam@google.com> Change ConsumerBase's FrameAvailableListener to be a weak pointer

This prevents strong reference cycles when the listener implementation also
holds a strong pointer to the ConsumerBase

Bug: 7425644
Change-Id: I1514b13a32b18d421c902dddebec0765a989c55c
onsumerBase.h
urfaceTexture.h
dd3cb84cfbe8068790c6233b5829fae9c4a0ee93 20-Oct-2012 Jamie Gennis <jgennis@google.com> SurfaceFlinger: add support for secure displays

This change adds support for displays that are not allowed to display surfaces
with the eSecure flag set. All non-virtual displays are considered secure,
while virtual displays have their secure-ness specified at creation time.

Bug: 7368436
Change-Id: I81ad535d2d1e5a7ff78269017e85b111f0098500
SurfaceComposer.h
urfaceComposerClient.h
2d5e230292c27d59f4c096bc742a0a19abf811c1 16-Oct-2012 Jamie Gennis <jgennis@google.com> SurfaceFlinger: add animation transactions

This change adds a transaction flag for WindowManager to indicate that a
transaction is being used to animate windows around the screen. SurfaceFlinger
will not allow more than one of these transactions to be outstanding at a time
to prevent the animation "frames" from being dropped.

Bug: 7353840
Change-Id: I6488a6e0e1ed13d27356d2203c9dc766dc6b1759
SurfaceComposer.h
urfaceComposerClient.h
2a09bb321930e1f782599ec902bca1db58b9af77 09-Oct-2012 Jeff Brown <jeffbrown@google.com> Add blankDisplay/unblankDisplay to SurfaceComposerClient.

Bug: 7309812
Change-Id: Ia401d642094a46c62f0d26c65da1d11341e203a1
urfaceComposerClient.h
9504eb915c9628e130f45019bdefda0168089886 05-Oct-2012 Jesse Hall <jessehall@google.com> Fix race condition in ConsumerBase::addReleaseFence()

This needs the ConsumerBase mutex locked, but wasn't locking it. Two
of the four places that called it already held the lock so were fine.
Now addReleaseFence() takes the lock itself, and I added
addReleaseFenceLocked() for the two already-locked callers, since in
one of them dropping the lock would be inconvenient.

Bug: 7289269
Change-Id: I7a5628adb516f8eec782aa6c14128202f96d7b0a
onsumerBase.h
c01a79d77b829e7de86ef137694e8ad708470ca1 28-Sep-2012 Andy McFadden <fadden@android.com> Pass display arg to blank/unblank

This allows us to blank and unblank displays other than the built-in
display (e.g. HDMI).

Bug: 7240511
Change-Id: I89ea13f9e497be74c3e1231d0c62fb558e93e0f8
SurfaceComposer.h
38b657265ccc5ae45bd7860a68b0d9373b47a2f3 28-Sep-2012 Iliyan Malchev <malchev@google.com> Revert "Compatibility work around for bad graphics driver dependency."

This reverts commit a50b51c03aca449920fc8581a738032a7bce7150

Change-Id: Ibdcd776a7f241dbb2475403ea04f939249774c41
urfaceComposerClient.h
4803b74e2a12a508f7bbfde6f6a962fe3299c61c 25-Sep-2012 Andy McFadden <fadden@android.com> Show build config in dumpsys SurfaceFlinger

This adds a line to the "dumpsys SurfaceFlinger" output that shows
build-time configuration values.

Example:
Build configuration: [sf HAS_CONTEXT_PRIORITY] [libui] \
[libgui USE_FENCE_SYNC]

Bug 7206633

Change-Id: Ibe1856b459d34a4be6ee83a4ebfd2807e6cc68a0
uiConfig.h
e96e9e1093b5700e9f403a6e2479da7dc36d3b71 25-Sep-2012 Mathias Agopian <mathias@google.com> fix a crasher in SurfaceTexture's setFilteringEnabled

bug: 7211067
Change-Id: Id8658a8df429d76c20ab9112858b38e52343dc9c
urfaceTexture.h
ff28e201ec0c6d620eaaa29814ab52958487dc31 21-Sep-2012 Mathias Agopian <mathias@google.com> Display events now always carry the display id they happened on

Change-Id: I12de1d883c23927722bc3a71b782f0079de4e831
isplayEventReceiver.h
148994e5f33ce240ff24ceb5bc0500b7f2001959 20-Sep-2012 Mathias Agopian <mathias@google.com> We now report hotplug events to the framework

Change-Id: I2d6b7787d39e5929485a551e4982498c5053c211
isplayEventReceiver.h
3941cb240d438bfdebe24920bb2ada86456a0bf9 18-Sep-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: default to doing GL sync

This change makes updateTexImage default to performing the necessary
synchronization and adds an argument for SurfaceFlinger to disable that
synchronization so that it can be performed lazily.

Change-Id: I7c20923cc786634126fbf7021c9d2541aa77be5d
Bug: 6991805
urfaceTexture.h
8dfa92fef9759a881e96ee58d59875d35023aab9 18-Sep-2012 Andy McFadden <fadden@android.com> Plumb display name into SurfaceFlinger

The Surface createDisplay() call takes a display name for debugging.
This change carries it through SurfaceFlinger and displays it in
the "dumpsys SurfaceFlinger" output.

Bug 7058158

Change-Id: I79f3474a8656ff1beb7b478e0dbf2c5de666118a
SurfaceComposer.h
urfaceComposerClient.h
6905205c8d130b6ea3a813c1b9283492ed183367 15-Sep-2012 Andy McFadden <fadden@android.com> Fix transform hints

The hints were being set a little too late, so the pre-rotation stuff
wasn't quite working.

Bug 7054997

Change-Id: Id8d5c626db7a76f768ba762a145b315878ee08e6
ufferQueue.h
61e04b92bdeafc6fca89052d14dab1bd0c384a71 10-Sep-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: use eglWaitSync

This change adds a compile-option to use eglWaitSyncANDROID to ensure that
texturing operations that access the current buffer of a SurfaceTexture do not
occur until the buffer is completely written. It also moves this
synchronization into a new SurfaceTexture method called doGLFenceWait and
changes SurfaceFlinger's Layer class to use that method rather than performing
its own wait on the fence.

Change-Id: I70afa88086ca7ff49a80e3cd03d423767db7cb88
urfaceTexture.h
b27254154642575dfb4bbfa79fbedde7d7ee23dd 06-Sep-2012 Jamie Gennis <jgennis@google.com> libgui: move fence handling into ConsumerBase

This change moves some common fence handling code into the base class for
BufferQueue consumer classes. It also makes the ConsumerBase class initialize
a buffer slot's fence with the acquire fence every time a buffer is acquired.

Change-Id: I0bd88bc269e919653b659bfb3ebfb04dd61692a0
onsumerBase.h
urfaceTexture.h
00e8c7a88a5b9c4104a71013a713acd3e4d3b77b 05-Sep-2012 Mathias Agopian <mathias@google.com> display projection API now has a single function instead of 3

Change-Id: I9bf46d372b77d547486d4bbe6f1953ec8c65e98f
urfaceComposerClient.h
c68f2ecfa02037144d1a3856f637a77f523cf416 31-Aug-2012 Jamie Gennis <jgennis@google.com> BufferQueue: add a setMaxAcquiredBufferCount check

This change adds a check to verify the validity of the value passed to
setMaxAcquiredBufferCount.

Change-Id: I39730557aa58261e678bd6e4fce11bab78e98362
ufferQueue.h
9e75ddda93888755d0b14144b62e896cd9f78f3a 01-Sep-2012 Jamie Gennis <jgennis@google.com> libgui: add BufferQueue test infrastructure

This change adds some infrastructure for testing the BufferQueue class. It
also includes a test that tests the new check in BufferQueue::acquireBuffer
that prevents the consumer from acquiring more than one buffer beyond the max
acquired buffer count that was set.

Change-Id: I38554ad3f9a53d2ddeba7ef0deee35ec2e2f9775
SurfaceTexture.h
72f096fb1ad0a0deadbfac5f88627461905d38e8 28-Aug-2012 Jamie Gennis <jgennis@google.com> BufferQueue: use max acquired buffer count

This change makes BufferQueue derive the min undequeued buffer count from a max
acquired buffer count that is set by the consumer. This value may be set at
any time that a producer is not connected to the BufferQueue rather than at
BufferQueue construction time.

Change-Id: Icf9f1d91ec612a079968ba0a4621deffe48f4e22
ufferQueue.h
1847f7fd799f92300b3786e49f5883eaa03f4507 31-Aug-2012 Jamie Gennis <jgennis@google.com> Merge "BufferQueue: simplify max buffer count handling" into jb-mr1-dev
2b9776982360a234803665cb79e8abcfeb0e3c79 31-Aug-2012 Jamie Gennis <jgennis@google.com> Merge "BufferQueue: clean up buffer counting" into jb-mr1-dev
94f261556cc5f4aa628cd5b71bf923b583f6e3c3 30-Aug-2012 Wink Saville <wink@google.com> Revert "A vendor ril depends on a native screen shot code."

This reverts commit 9b5782baf0a8a2d7afc7129453beb5df7abe7650.

A new ril for toro, hack no longer needed.
urfaceComposerClient.h
e191e6c34829aec406a9cfe3e95211f884a311ff 25-Aug-2012 Jamie Gennis <jgennis@google.com> BufferQueue: simplify max buffer count handling

This change reworks how the maximum buffer count is computed.

Change-Id: I7d3745814b9bd6f6f447f86bfea8eb7729914ebf
ufferQueue.h
31a353da225af5329735451c761b430d82dfda1b 25-Aug-2012 Jamie Gennis <jgennis@google.com> BufferQueue: clean up buffer counting

This change is a clean up of some of the handling of the maximum number of
buffers that are allowed at once. It mostly renames a few member variables and
methods, but it includes a couple small refactorings.

Change-Id: I9959310f563d09583548d4291e1050a7bbc7d87d
ufferQueue.h
urfaceTexture.h
9b5782baf0a8a2d7afc7129453beb5df7abe7650 29-Aug-2012 Wink Saville <wink@google.com> A vendor ril depends on a native screen shot code.

Add a temporary shim until the vendor fixes the ril.

Bug: 7073467
Change-Id: Ia95a58bd90677c03406c988d1c29ae785f8662f2
urfaceComposerClient.h
3ee454a7bef8bd3d1c9cdd9d17108eb80ebadf2a 28-Aug-2012 Mathias Agopian <mathias@google.com> Eradicate DisplayID.

DisplayDevices are now keyed of the wp<IBinder> the client uses.
DisplayID has now become DisplayType which is just used to identify
physical displays (as opposed to virtual displays such as wifi displays).

Change-Id: I0c5968f2c902dcd699a7e0afacf833ff070c12ea
SurfaceComposerClient.h
a50b51c03aca449920fc8581a738032a7bce7150 28-Aug-2012 Jeff Brown <jeffbrown@google.com> Compatibility work around for bad graphics driver dependency.

This is a compatibility shim for one product whose drivers
are depending on SurfaceComposerClient::getDisplayInfo(
int, DisplayInfo*) when it really shouldn't.

Revert this patch when the problem has been resolved.

Bug: 7065398
Change-Id: I6542691b81fd1b1e1d79500a62e82d40a3d51db7
urfaceComposerClient.h
380223bf1b340e7503177254a60d5982f95ab793 27-Aug-2012 Jeff Brown <jeffbrown@google.com> Remove unused "layer" argument from show().

Change-Id: I8944a9f4a27c330b11e5e837c69b88c8f84145ba
urface.h
urfaceComposerClient.h
9d4e3d2f42e93e2d12bacabe97d307d30c3c20dd 25-Aug-2012 Jeff Brown <jeffbrown@google.com> Banish DisplayID from the SurfaceFlinger API.

Use only display tokens in the API to refer to new displays.

Don't require the caller to specify the display when creating
a surface (since in general a surface could be shown on
any display).

This is intended to be a minimum change just to update the API.
Note that SurfaceFlinger still uses DisplayID in a few places
internally that might cause some features not to work properly
when there are multiple displays (LayerScreenshot, for example).

Change-Id: I3d91eec2da406eefd97bcd53655d403ad865a7e6
SurfaceComposer.h
SurfaceComposerClient.h
urface.h
urfaceComposerClient.h
490aee0fc5012acf2bf0b1dfe9c09e6fcca606fc 24-Aug-2012 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: inherit from ConsumerBase (try 2)" into jb-mr1-dev
9fea3421ffddf6480f57f55a25936a886043d909 08-Aug-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: inherit from ConsumerBase (try 2)

This change makes SurfaceTexture inherit from ConsumerBase. It removes all of
the functionality from SurfaceTexture that is now provided by the base class.
This includes fixes for two bugs that were found after checking this change in
the first time and then reverting it.

Change-Id: Ie2d9f4f27cfef26fdac341de3152e842b01a58d2
onsumerBase.h
urfaceTexture.h
e232fdca2a62dc5e81b550f5be8710e36174e7a6 21-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Add BufferItemConsumer, a simple BufferQueue consumer.

BufferItemConsumer allows for acquiring BufferQueue's BufferItems,
which contain all the data and metadata the BufferQueue has for a
given graphics buffer.

This consumer is useful when direct access to the native buffer_handles
is needed by the client.

Also includes a minor cleanup of CpuConsumer's use of 'virtual'.

Bug: 6243944
Change-Id: If7dc4192b15ac499555f1eda42a85140f2434795
ufferItemConsumer.h
puConsumer.h
f57e7540d4cf799f18fe87d3536c55f1e0064931 21-Aug-2012 Eino-Ville Talvala <etalvala@google.com> CpuConsumer: inherit from ConsumerBase

Change-Id: I55178b1d673ffa0fbc6e63ef47642c64d4d03228
puConsumer.h
8683fca395d01734ec7946e9f0595ec5d7b754c6 13-Aug-2012 Mathias Agopian <mathias@google.com> improve [un]marshalling of non-binder objects

this change introduces a new class LightFlattenable<> which is
a protocol to flatten simple objects that don't require
binders or file descriptors; the benefit of this protocol is that
it doesn't require the objects to have a virtual table and give us
a consitant way of doing this.

we also introduce an implementation of this protocol for
POD structures, LightFlattenablePod<>.

Parcel has been update to handle this protocol automatically.

Sensor, Rect, Point and Region now use this new protocol.

Change-Id: Icb3ce7fa1d785249eb666f39c2129f2fc143ea4a
ensor.h
e57f292595bec48f65c8088b00ff6beea01217e9 10-Aug-2012 Mathias Agopian <mathias@google.com> make multi-display more real

- displays are represented by a binder on the client side
- c++ clients can now create and modify displays

Change-Id: I203ea5b4beae0819d742ec5171c27568f4e8354b
SurfaceComposer.h
urfaceComposerClient.h
3165cc21cfea781988407b19bd83292b19f05f55 09-Aug-2012 Mathias Agopian <mathias@google.com> libgui includes refactoring

Change-Id: I1d24ec17f5003ec2abab5f7472daaff4cc4cc2d3
SurfaceComposer.h
SurfaceComposerClient.h
1a4d883dcc1725892bfb5c28dec255a233186524 03-Aug-2012 Jamie Gennis <jgennis@google.com> surfaceflinger: refactor FrambufferSurface

This change refactors the FramebufferSurface class to inherit from the new
ConsumerBase class.

Bug: 6620200
Change-Id: I46ec942ddb019658e3c5e79465548b171b2261f2
ufferQueue.h
onsumerBase.h
92efd84f37ce5a8aae74dc9086f825a67b6894e9 03-Aug-2012 Mathias Agopian <mathias@google.com> screen-off animation won't be handled by SF anymore

Change-Id: Idc41386804ae7d7eb981c36e1bc55c270870c8d0
SurfaceComposer.h
c666cae2d5995097ec49a87e375e2afdd92802b7 26-Jul-2012 Mathias Agopian <mathias@google.com> get rid of the shared-memory control block

Change-Id: If814060aca1d2ff2619d4adcd57296983d207f7f
SurfaceComposer.h
urfaceComposerClient.h
8785578391eacd4192333d7b0ce3afedd7d163e6 25-Jul-2012 Mathias Agopian <mathias@google.com> add a layerStack attribute to Layers.

this attribute can be set through a regular transaction using
SurfaceComposerClient (just like any other attribute, eg: position or size)

Change-Id: I701a47c677ea6442ca713728a93335328cd2b172
SurfaceComposer.h
urfaceComposerClient.h
8b33f032327f8de0dcc0e6d0d43ed80f834b51f6 25-Jul-2012 Mathias Agopian <mathias@google.com> update SF binder protocol to support setting display attributes

no change of functionality -- the old behavior is implemented
on top of this new protocol.
this new protocol will allow, eventually, to pass informations
about displays and layer stacks.

Change-Id: Ic6c2295e61ec8ecbc8ce01ab7664e35d928202fc
SurfaceComposer.h
6d7e32c672189ef2b900fc5467dbf603f84dce54 17-Jul-2012 Jeff Brown <jeffbrown@google.com> Remove unused layer flags.

Change-Id: Ia85365f18770a9a2c0a0e30ae56b6c2226d41be6
SurfaceComposer.h
6501e9944df131b3b7e293007084735dfa217f24 17-Jul-2012 Jeff Brown <jeffbrown@google.com> Remove freeze(), unfreeze() and setFreezeTint().

This is all dead code.

Change-Id: I646673aac793a6ec45021c370a2450f0ea4fbcce
SurfaceComposer.h
urface.h
urfaceComposerClient.h
f9176a93a5c9061fe001c91bca50dd0a58d54f10 16-Jul-2012 Jeff Brown <jeffbrown@google.com> Remove freezeDisplay(), which is no-op.

Change-Id: I2b70249a1545636fd6d98b58057b22f9529cad21
urfaceComposerClient.h
dc5b485f74edf2d2f31c62054eb6c180421a3ade 30-Jun-2012 Jesse Hall <jessehall@google.com> Pass fence to HWC on first use of buffer

Also do a CPU-wait on the fence before using it for GL composition.

Change-Id: I0f645a42a44803276cae11b904e5a26d65871562
urfaceTexture.h
b42b1ac1587aebda5e2f334d95b620271fafba4e 28-Jun-2012 Jesse Hall <jessehall@google.com> Return fence from acquireBuffer

Change-Id: Iab22054c1dc4fd84affab3cc5bbdcd5a1e689666
ufferQueue.h
c777b0b3b9b0ea5d8e378fccde6935765e28e329 28-Jun-2012 Jesse Hall <jessehall@google.com> Pass fences with buffers from SurfaceTextureClient

Change-Id: I09b49433788d01e8b2b3684bb4d0112be29538d3
ufferQueue.h
SurfaceTexture.h
3094df359d1e6e2ae8ca4e935cc093f563804c96 19-Jun-2012 Mathias Agopian <mathias@google.com> First prototype atttempting to support an external display

both API and implementation will change, this is just a prototype
intended to show feasability.

SurfaceFlinger is passed an ISurfaceTexture through a new
callback, it is in turn used to create an EGLSurface which
surfaceflinger will draw into in addition to the main screen.

Change-Id: Id0bbb0b854bb7bae44d57246a90b65d4567f9a21
SurfaceComposer.h
f78575400977f644cf0b12beb2fa5fc278b6ed4c 15-Jun-2012 Jesse Hall <jessehall@google.com> Pass fences from BufferQueue to SurfaceTextureClient

ISurfaceTexture::dequeueBuffer now returns the buffer's fence for the
client to wait on. For BufferQueue, this means passing it through
Binder so it can be returned to the SurfaceTextureClient. Now
SurfaceTextureClient is responsible for waiting on the fence in
dequeueBuffer instead of BufferQueue: one step closer to the goal.

Change-Id: I677ae758bcd23acee2d784b8cec11b32cccc196d
ufferQueue.h
SurfaceTexture.h
ef19414bd8b77a26f5751f3845be79025a8263fe 14-Jun-2012 Jesse Hall <jessehall@google.com> Transfer HWC release fences to BufferQueue

After a HWC set, each SurfaceFlinger Layer retrieves the release fence
HWC returned and gives it to the layer's SurfaceTexture. The
SurfaceTexture accumulates the fences into a merged fence until the
next updateTexImage, then passes the merged fence to the BufferQueue
in releaseBuffer.

In a follow-on change, BufferQueue will return the fence along with
the buffer slot in dequeueBuffer. For now, dequeueBuffer waits for the
fence to signal before returning.

The releaseFence default value for BufferQueue::releaseBuffer() is
temporary to avoid transient build breaks with a multi-project
checkin. It'll disappear in the next change.

Change-Id: Iaa9a0d5775235585d9cbf453d3a64623d08013d9
ufferQueue.h
urfaceTexture.h
d8e812ce6fe9ae0388e98b08456e1d18b9498239 14-Jun-2012 Jamie Gennis <jgennis@google.com> Update ANativeWindow clients for sync

This change updates the uses of ANativeWindow to use the new ANW functions that
accept and return Sync HAL fence file descriptors.

Change-Id: I3ca648b6ac33f7360e86754f924aa072f95242f6
urfaceTextureClient.h
3e87601170141229d661df93e2f59e1ced73474b 08-Jun-2012 Mathias Agopian <mathias@google.com> Implement SurfaceFlinger's ANW on top of BufferQueue

SF now has its own implementation of ANW for the
framebuffer and it uses BufferQueue. FramebufferNativeWindow
is now only used by stand-alone apps.

Change-Id: Iddeb24087df62bd92b0f78e391dda9b97ddc859c
ufferQueue.h
8e533069e5721e55cb9768e140e16546c3a4a8b6 07-Jun-2012 Colin Cross <ccross@android.com> surfaceflinger: replace early suspend with binder call from PowerManager

SurfaceFlinger will no longer directly synchronize with early suspend.
Instead, PowerManagerService will synchronize with SurfaceFlinger to
ensure that a black frame has been drawn on the display, and then
trigger all early suspend handlers.

Change-Id: I07acdd628440d23fdb69db94319ec5d65d3f4919
SurfaceComposer.h
2466e402a054669ecda0d2b0dcb9cc08c4a9559a 30-May-2012 Mathias Agopian <mathias@google.com> am 584fcb32: am 2c8207e9: add the ability to reject buffers in SurfaceTexture::updateTexImage

* commit '584fcb3218e07d7b4cc0aeaef41faa4e891b45a4':
add the ability to reject buffers in SurfaceTexture::updateTexImage
2c8207e9627fe6c7a90e31fae8d71ae49df56845 24-May-2012 Mathias Agopian <mathias@google.com> add the ability to reject buffers in SurfaceTexture::updateTexImage

SurfaceFlinger is using this new feature to reject buffers that
don't have the right size.

Bug: 6498869
Change-Id: I8a7250a47db6c082a357b703feb3b9d0fc8d3443
urfaceTexture.h
a74eb25cbc42a9dde0df6b2303fda9027f77f393 15-May-2012 Jamie Gennis <jgennis@google.com> am dd739965: Merge changes I32fbc2b6,Ifd0ed05b into jb-dev

* commit 'dd73996552938ac5165a35f09d389abedcf421ef':
SurfaceFlinger: recompute visible regions less
libgui: remove setPostTransformCrop
e41b318bc4708e1dee9364e73215ff0d51fb76a1 17-Apr-2012 Eino-Ville Talvala <etalvala@google.com> Add a BufferQueue CPU consumer.

Aimed for use cases where gralloc buffers need to be consumed by CPU
users, such as camera image data streams.

The CpuConsumer is a synchronous queue, which exposes raw pointers to
the underlying graphics buffers to applications. Multiple buffers may
be acquired at once, up to the limit set at time of construction.

Change-Id: If1d99f12471438e95a69696e40685948778055fd
ufferQueue.h
puConsumer.h
b7a6b96301c00c630610df4cb55a45d666200817 14-May-2012 Jamie Gennis <jgennis@google.com> libgui: remove setPostTransformCrop

This change removes the setPostTransformCrop function from
SurfaceTextureClient. It also includes a small logging fix in BufferQueue.

Bug: 6299171
Change-Id: Ifd0ed05b95dad6085e7a8267fda4d69b76ea3bad
urfaceTextureClient.h
f15a83f5814219c167f87cb8aaea622fc8493499 11-May-2012 Jamie Gennis <jgennis@google.com> SurfaceFlinger: add a crop to the layer state

This change adds a crop rectangle specified in window coordinates to the layer
state. The all window pixels outside this crop rectangle are treated as though
they were fully transparent. This change also adds the plumbing necessary for
WindowManager to set that crop.

Change-Id: I582bc445dc8c97d4c943d4db8d582a6ef5a66081
SurfaceComposer.h
urface.h
urfaceComposerClient.h
5c1139fea3cc0fd9847a6594d853a458152b2fbc 09-May-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: improve texture matrix computation

This change reduces the shrinking of the crop rectangle in some cases. It adds
a way to inform the SurfaceTexture that its texture will be used without
bilinear interpolation, and uses knowledge of the pixel format to avoid
shrinking unecessarily.

Change-Id: I72365f39f74ecb7fcc51b4cf42f2d0fa97727212
urfaceTexture.h
d72f233ffa125856a44976a50a66ceb669f49ab2 07-May-2012 Jamie Gennis <jgennis@google.com> libgui: Add support for post-xform crops.

This change adds support for specifying a crop rectangle to a
SurfaceTextureClient that is in post-transformed coordinate space.

Change-Id: I247901de343e71b32850f7ae3bac62dfa612ad3d
Bug: 6299171
ufferQueue.h
SurfaceTexture.h
urfaceTexture.h
urfaceTextureClient.h
efc7ab6dcea8c22ddd7c0259ef4ab4bbf1e93044 18-Apr-2012 Jamie Gennis <jgennis@google.com> libgui: Add plumbing for active rectangle

This change adds the plumbing to SurfaceTextureClient, BufferQueue, and
SurfaceTexture to get the active rectangle passed to the ANativeWindow to
the buffer consumer.

Change-Id: I35da0889b266327ebb079b6a7136fa3e2e8b00e6
ufferQueue.h
SurfaceTexture.h
urfaceTexture.h
urfaceTextureClient.h
2488b20aec097accb20a853d9876bb0a5dc04636 21-Apr-2012 Mathias Agopian <mathias@google.com> add a way to query whether an ANativeWindow consumer is running ahead of the producer

Change-Id: Ibccfa1feb56db2ab11f0c0934ce2d570a2b65ae2
SurfaceTexture.h
urfaceTextureClient.h
24202f5676c32edeef6544cf36e06b9fc970dbde 23-Apr-2012 Mathias Agopian <mathias@google.com> update the binder protocol for connect to match that of queueBuffer

indeed, connect and queueBuffer return the same data, so it's
easier to have them use the same protocol.

Change-Id: I4f9fa3be0a80c9ab0a7a4039b282ae843aab02e1
ufferQueue.h
SurfaceTexture.h
a0db308c3d62301ae41b2e2bcf295c4ee4c7b08e 23-Apr-2012 Mathias Agopian <mathias@google.com> remove SurfaceTexture::connect()

use BufferQueue::connect() instead

Change-Id: I04aab7cf11304bf962cde38470747f3b19ddba42
urfaceTexture.h
85b217668d6840c8e6a109adfb99461313676f8d 14-Apr-2012 Eino-Ville Talvala <etalvala@google.com> Remove fixed USAGE_HW_TEXTURE flag from BufferQueue.

USAGE_HW_TEXTURE applies to SurfaceTexture, not to all uses of
BufferQueue. Refactor accordingly.

Change-Id: Ic7add5e1f2bbec3d3e796ba7f15eaa0633945d8f
urfaceTexture.h
ac6035a12aec38eeb14d0c13636ec980066d9a8f 13-Apr-2012 Mathias Agopian <mathias@google.com> s/w rendered apps can now use n-buffering (n>2)

Bug: 6311881
Change-Id: I6e52e281e8d432430aad011f6d9dcf35d7b4ac7d
urfaceTextureClient.h
016c8cbce4dde21f2703b9865f52d16b8d5d5ae2 04-Apr-2012 Daniel Lam <dalam@google.com> Enabled cropping support in SurfaceTexture

SurfaceTexture will modify the crop rect so it matches
the desired output aspect ratio when the scaling
mode is NATIVE_WINDOW_SCALING_MODE_CROP. Added a test
for this new scaling mode.

Change-Id: I60f24dcbc294b65cd10a393d9e27d40f07d27bb6
urfaceTexture.h
55a701459de964ae3504264a6b8c4dc37f54a9e8 10-Apr-2012 Michael I. Gold <gold@nvidia.com> SurfaceTextureClient: support for application buffer dimensions

Add a new API native_window_set_buffers_user_dimensions to allow native
applications to override the native window size for the default buffer size.
This has lower precedence than the existing
native_window_set_buffers_dimensions and allows the two to co-exist.

Change-Id: Ie73590e1c94ef0dadbce500bd0941dfabbcace3c
urfaceTextureClient.h
f0bc2f1d8d37977bd3aef3d3326a70e9e69d4246 10-Apr-2012 Mathias Agopian <mathias@google.com> use in/out structures for queueBuffer() IPC

Change-Id: Ie125df2444b62a9a2200586a717dca268852afc9
ufferQueue.h
SurfaceTexture.h
fbcda930dd8b2823cfeb160fd0131f5897b7522f 10-Apr-2012 Daniel Lam <dalam@google.com> BufferQueue returns proper code on acquire

Also removed unnecessary debug messages from
SurfaceTextureClient.

Change-Id: I291897a44170142f9d42a007b008823fad4683e0
ufferQueue.h
abe61bfda4938abd932465e27c29ba9e41aea606 27-Mar-2012 Daniel Lam <dalam@google.com> BufferQueue no longer hardcodes buffer counts

BufferQueue is now more flexible as it can be used
by SurfaceMediaSource in addition to SurfaceTexture.

Change-Id: I4222be8918d63372c44fcd412d9ad241c6a3eeb9
ufferQueue.h
urfaceTextureClient.h
8cce8a9a75d172e0077960223ac5f2d06df33892 06-Apr-2012 Jamie Gennis <jgennis@google.com> Merge "Fixed disconnect bug in SurfaceTexture"
7b5be95cb3903087742f1079fe89cddd8abe3696 03-Apr-2012 Mathias Agopian <mathias@google.com> use a socketpair instead of a pipe in BitTube

Bug: 6252830
Change-Id: Ia7a7b08409517214136261c05569dc5959a597ab
itTube.h
isplayEventReceiver.h
ensorEventQueue.h
9abe1ebc9575dc5a19bf1dfce6e9b02e03374457 27-Mar-2012 Daniel Lam <dalam@google.com> Fixed disconnect bug in SurfaceTexture

BufferQueue's disconnect could race with updateTexImage
where invalid buffers could be released. Additionally
fixed similar bug with setBufferCount. Tests were added
to stress the disconnect mechanism.

Change-Id: I9afa4c64f3e025984e8a9e8d924852a71d044716
ufferQueue.h
urfaceTexture.h
0e1080f887bcd80c75910cabe7b2eca224bf739c 02-Apr-2012 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: add context attach & detach"
74bed55fff0132be319bcd1703970516ae28b3a9 29-Mar-2012 Jamie Gennis <jgennis@google.com> SurfaceTexture: add context attach & detach

This change adds the detachFromContext and attachToContext methods to
SurfaceTexture. These methods allow the SurfaceTexture to switch from
one consumer GLES context to another. This change also includes a few
cleanups to the error return codes in updateTexImage.

Change-Id: I0df1eb599aa7b6f58f07431f242f8f09269559ed
urfaceTexture.h
851ef8f1bfbb164d61b1528a529a464f0a60dbaf 30-Mar-2012 Mathias Agopian <mathias@google.com> reduce IPC with BufferQueue

collapse setCrop, setTransform and setScalingMode to queueBuffer()
this ends up simplifying things quite a bit and reducing the numnber
of IPC needed per frame.

Change-Id: I3a13c07603abe4e76b8251e6380b107fde22e6d9
ufferQueue.h
SurfaceTexture.h
urfaceTextureClient.h
9d61a28d72d85ac0460fb7fba9f85f8a955354c7 27-Mar-2012 Daniel Lam <dalam@google.com> Refactored DummyConsumer

DummyConsumer no longer uses a ProxyConsumerListener

Change-Id: I0a99428b3f9dae82cb47d5da3589de77653f3d7c
ummyConsumer.h
f71c4ae136f7749b9dfdaa2dd64d771868eeeb2d 24-Mar-2012 Daniel Lam <dalam@google.com> Added a DummyConsumer for use with BufferQueue.

The DummyConsumer is a consumer that can connect to BufferQueue
that does nothing. It is required as BufferQueue checks
if a consumer is connected. Also fixes a bug where SurfaceTexture
was reusing old texture slots.

Bug: 6172739
Change-Id: I5e7a118dd4d07807ba4c763200242b5ee7d3412b
ufferQueue.h
ummyConsumer.h
b0e76f456afaada43ddb0968bb37145219f90cd3 23-Mar-2012 Mathias Agopian <mathias@google.com> remove dependency of EGL on ndk header

Change-Id: Ia6e489b5b4f028864bdf54923e81f604710dd8ad
urfaceTextureClient.h
ce561372186c7549a8a5fe996ac5965cda087007 20-Mar-2012 Jamie Gennis <jgennis@google.com> libgui: have ST::updateTexImage check the GL ctx

This change adds a check to SurfaceTexture::updateTexImage to verify
that the current GL context is the same as the one that was used for
previous updateTexImage calls.

Change-Id: If02d2f787bcfdb528046dc9ddf6665f8a90e1bf4
urfaceTexture.h
fa5b40ebb8923133df12dc70591bfe35b3f1c9b3 15-Mar-2012 Jamie Gennis <jgennis@google.com> libgui: add BQ consumer buffer free notifications

This change adds a new callback for BufferQueue consumers to be notified
when the BufferQueue frees some or all of its buffers. This is needed
to retain SurfaceTexture behavior where all buffers would be freed when
the producer disconnects. This change also modifies the
SurfaceTextureGLToGLTest.EglDestroySurfaceUnrefsBuffers test to catch
when the buffers are not freed.

The implementation is a little complicated because it needs to avoid
circular sp<> references across what will be a binder interface (so wp<>
can't be used directly). It also needs to avoid the possibility of
locking the BufferQueue and consumer (e.g. SurfaceTexture) mutexes in
the wrong order.

This change also includes a few additional fixes and test cleanups.

Change-Id: I27b77d0af15cb4b135f4b63573f634f5f0da2182
ufferQueue.h
urfaceTexture.h
b267579ba8dfe3f47d2a481c5a3c2254e3d565a1 23-Feb-2012 Daniel Lam <dalam@google.com> SurfaceTexture: Fully refactored from BufferQueue

SurfaceTexture and BufferQueue are separate objects.

Change-Id: I230bc0ae6f78d0f9b2b5df902f40ab443ed5a055
ufferQueue.h
urfaceTexture.h
urfaceTextureClient.h
eae59d2ea77ef57aab203fb185a880ce37ac38d6 23-Jan-2012 Daniel Lam <dalam@google.com> Removed dependecies between BufferQueue and SurfaceTexture

Refactored SurfaceTexture and BufferQueue such that share
no protected members. Created an consumer facing interface
for BufferQueue in preparation of connecting SurfaceTexture
and BufferQueue through a binder.

Change-Id: I938e63e085128148c58d0e26c7213b30145c109f
ufferQueue.h
urfaceTexture.h
fbb16559168b88e30ffbe6d466f4c044366f503c 27-Feb-2012 Jamie Gennis <jgennis@google.com> Merge "Revert "Removed dependecies between BufferQueue and SurfaceTexture""
90ac799241f077a7b7e6c1875fd933864c8dd2a7 26-Feb-2012 Mathias Agopian <mathias@google.com> fix libgui header location

Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
ufferQueue.h
GraphicBufferAlloc.h
Surface.h
SurfaceComposer.h
SurfaceComposerClient.h
urface.h
urfaceComposerClient.h
9b10c47e112afc3600380895046a4a56e34cf6a8 27-Feb-2012 Daniel Lam <dalam@google.com> Revert "Removed dependecies between BufferQueue and SurfaceTexture"

This reverts commit a631399f71dbc7659d2f241968f85d337726ae61
ufferQueue.h
urfaceTexture.h
32167056348f55609b896a5f6b15bd1dd42d8d19 27-Feb-2012 Jamie Gennis <jgennis@google.com> Merge "Removed dependecies between BufferQueue and SurfaceTexture"
5f2165f9455d4893b581b73a67c5431f4344b47e 25-Feb-2012 Mathias Agopian <mathias@google.com> remove dependency on android_native{s_priv|buffer}.h

Change-Id: Ie4b95f7061c240f37c504414259f92d72c4ffc89
urfaceTextureClient.h
333023884112259f145bb23c41a05211198d9792 23-Jan-2012 Daniel Lam <dalam@google.com> Removed dependecies between BufferQueue and SurfaceTexture

Refactored SurfaceTexture and BufferQueue such that share
no protected members. Created an consumer facing interface
for BufferQueue in preparation of connecting SurfaceTexture
and BufferQueue through a binder.

Change-Id: Iff55e740e36a7f70c9f7a17ee7a5af38e3d21f0f
ufferQueue.h
urfaceTexture.h
b856052c00dfef70d0957482c72c2979ffc4733a 31-Jan-2012 Daniel Lam <dalam@google.com> Refactored query function from SurfaceTexture into BufferQueue

Change-Id: Id1cb6cc38d01edb4fcfcad867c5a7693bdcc3ab1
ufferQueue.h
urfaceTexture.h
6b091c53000c843211c218ce40287a7edca9bc63 23-Jan-2012 Daniel Lam <dalam@google.com> Refactored ISurfaceTexture calls from SurfaceTexture into BufferQueue.

Change-Id: I514f6b802f6b49c9ae27bed37bf0b9d23da03c9a
ufferQueue.h
urfaceTexture.h
99ce5cdeb383216dee95af4d90e47406b0948ea1 01-Feb-2012 Mathias Agopian <mathias@google.com> separate transactions from updates

with this changes, SF transactions are handled as soon as possible
but do not trigger updates. the update is delayed until the next
vsync.

this allows us to work much better without requiring triple-buffering.

Change-Id: I1fa10794d0cf742129f0877698b7b1e1f2ec7401
isplayEventReceiver.h
3cf199aef6250552555344944c3e3a6e4ab05f92 01-Feb-2012 Mathias Agopian <mathias@google.com> fix an issue with vsync event delivery

vsync events were sometimes delivered to connected
client who didn't request them. this happened if
another client requested the delivery and that client
was first in the client list.

also fix the vsync test which didn't request any events as
well as DisplayEventReveiver documentation which was misleading
about the necessity to request vsync events.

Change-Id: Ie990fda3f337f8f0042745c4b2cde67936c45686
isplayEventReceiver.h
478ae5eb5a0047e1b2988c896cff6363b455ee50 07-Dec-2011 Mathias Agopian <mathias@google.com> Improve the VSYNC api a bit.

- add the ability to set the vsync delivery rate, when the rate is
set to N>1 (ie: receive every N vsync), SF process' is woken up for
all of vsync, but clients only see the every N events.

- add the concept of one-shot vsync events, with a call-back
to request the next one. currently the call-back is a binder IPC.

Change-Id: I09f71df0b0ba0d88ed997645e2e2497d553c9a1b
isplayEventReceiver.h
DisplayEventConnection.h
a4fbecd1198899a3a4e55795406a06e7c111b13e 30-Nov-2011 Mathias Agopian <mathias@google.com> am 55d3880e: am bb1e7d43: Merge changes I7e973a35,Ib3386fcc into ics-mr1

* commit '55d3880eed3450748eb7b97281e030902ee29c2a':
SurfaceTexture: add EGL_KHR_fence_sync option
SurfaceTexture: add a blit-to-FBO test
86edf4f6470ee0f108bf40d3c1d23bf0a78c9c38 14-Nov-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add EGL_KHR_fence_sync option

This change adds a compile-time option for SurfaceTexture to use the
EGL_KHR_fence_sync extension to synchronize access to Gralloc buffers.

Bug: 5122031
Change-Id: I7e973a358631fff5308acf377581b811911fe790
urfaceTexture.h
d0566bc26fcf6ca396118701fa11900b627f2c09 18-Nov-2011 Mathias Agopian <mathias@google.com> Add support for sending VSYNC events to the framework

use gui/DisplayEvent to receive the events. Events are
dispatched through a unix pipe, so the API is compatible
with utils/Looper. see gui/DisplayEvent.h for more info.

Bug: 1475048
Change-Id: Ia720f64d1b950328b47b22c6a86042e481d35f09
isplayEventReceiver.h
DisplayEventConnection.h
185a0a0420f54f9588ec1c7230313023a7a2259b 22-Nov-2011 Jamie Gennis <jgennis@google.com> am c2597295: am 53cf2020: Merge changes I37fd43b5,I91eb29db,I0491ce35 into ics-mr1

* commit 'c25972950c2ea62fb085524dbe737c2bf0f08f4a':
SurfaceTexture: fix a couple tests
EGL: default to swap interval 1
SurfaceTexture: clean up some tests
59769469e4b9b2d8b12c020eb44b030b3927a50b 20-Nov-2011 Jamie Gennis <jgennis@google.com> EGL: default to swap interval 1

This change explicitly sets swap interval 1 on the window when an
EGLSurface is created to render to it.

Change-Id: I91eb29dbee3ae4a55076b921f084d503fbe94e03
urfaceTexture.h
8bee68fac2dba0a72a58a243601d5d7d12e116e6 19-Nov-2011 Mathias Agopian <mathias@google.com> am d0df44b5: am 4d71053b: Merge "attempt to fix bug 5313580" into ics-mr1

* commit 'd0df44b5c979e00a19187cea35768ba26557e447':
attempt to fix bug 5313580
a36bcd53ac075054bb39ef506687f4daaf9bac6b 18-Nov-2011 Mathias Agopian <mathias@google.com> attempt to fix bug 5313580

the working theory here is that a Surface object has become non-promotable
because it lost its last reference; later Surface::readFromParcel is called
the previous surface is found in the cache, but can't be promoted. this causes
a new Surface object to be created which will promptly try to connect to the
CPU_API -- this in turn will fail because the previous (now dead) surface is
still connected.

To fix this, we make sure to disconnect from the SurfaceTexture when
Surface[TextureClient] is destroyed.

Change-Id: I422234868a05d7b7d283e9d5a85f7ab79e65d8a9
urfaceTextureClient.h
ccf5b9febc9486c67ace40fbfc53b49eadf2c159 17-Nov-2011 Jamie Gennis <jgennis@google.com> am 7765fc65: am fd6b64f6: Merge "SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call" into ics-mr1

* commit '7765fc651a9519dd2f0ac9d3374a50e9865c5c99':
SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call
a929748ddb67cbece3337c7fda7877fdeb973aa4 10-Nov-2011 Sunita Nadampalli <sunitan@ti.com> SurfaceTexture: Fix to return the oldest of free buffers to Client on Dequeue call

Surface Texture dequeue logic is modified to return the oldest of the
free buffers to Client on dequeue call.

Currently dequeue method is returning the first buffer index which is free.
The parsing is done in ascending order of the buffer slot indices.
This leads to returning the buffer which has been just queued to composer,
and hence display, and this defeats the purpose of having minimum dequeue count
as 2 in asynchrnouse mode.

This is fixed by checking all the free slots and returning the oldest buffer.

Change-Id: Ibbac10593c3994c278c601af0480b171635ecdd4
Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
urfaceTexture.h
8c11963dda80d4add300520a8863bed39231825d 14-Nov-2011 Mathias Agopian <mathias@google.com> am 738d8cae: am c93a151f: Merge "Define, document, and test the behavior of very large SurfaceTextures" into ics-mr1

* commit '738d8cae2239d194429676f2889cfae3c8f7ba08':
Define, document, and test the behavior of very large SurfaceTextures
194c76c0477189700fda068e19b953b1d9af201a 10-Nov-2011 Mathias Agopian <mathias@google.com> Define, document, and test the behavior of very large SurfaceTextures

updateTexImage() now throws a runtime exception when its native
counterpart fails

Bug: 5506633

Change-Id: I151a6f685d465966e7df4df624412ab2da62e95f
urfaceTexture.h
5cae0d0699a169e468fff3e21165f35db12f2cde 21-Oct-2011 Mathias Agopian <mathias@google.com> Rename SensorChannel to BitTube
itTube.h
SensorEventConnection.h
ensorChannel.h
ensorEventQueue.h
1a2b83a17d3bdb2440b8b5b96136f7916a5528b5 17-Oct-2011 Mathias Agopian <mathias@google.com> SensorManager reconnects to sensor service when the later dies

if system process ever restarted, processes using a SensorManager
would loose the ability to use it, resulting to a crash.
we now listen for sensor service death and reconnected if necessary.

Bug: 5445240
Change-Id: Ia47f8b26cdcecb729fa22bf11d55e10fcaef8cfc
ensorManager.h
fb1b5a2f333800574b0da435d1200cf9b13d723f 28-Sep-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: parameterize the texture target

This change adds a hack to allow Android Browser to use a SurfaceTexture
to stream RGBA images to a GL_TEXTURE_2D texture object.

Change-Id: Idb90064d5d4b920959ef3be7451362ac5012460e
urfaceTexture.h
fa28c35c21d1bf8b38f541758c291bc17a2d7270 17-Sep-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add name support

This change adds support for setting a string that can be used to
identify a SurfaceTexture object in log messages.

Change-Id: Ib4ee085f36c8830dc964c05ef1654f5a55dfcd60
urfaceTexture.h
29b5762efc359022168e5099c1d17925444d3147 18-Aug-2011 Mathias Agopian <mathias@google.com> don't return the current buffer from dequeueBuffer

we were not reseting mCurrentTexture in some situations
which in turn caused dequeueBuffers() return a
"FREE" buffer that was also current.
Very often it was harmless, but it created a race with
updateTexImage() which could cause the following
queueBuffers() to fail.

Bug: 5156325
Change-Id: If15a31dc869117543d220d6e5562c57116cbabdb
urfaceTexture.h
8e19c2e97e11505ee2ecf336275fd956f2ccfa22 11-Aug-2011 Mathias Agopian <mathias@google.com> fix a crasher in SurfaceTexture::updateTexImage()

we now make sure to drain the buffer queue on disconnect.
this happens only when in synchrnous mode. in async mode
we clear all buffers except the head of the queue.

for extra safety we also catch the null pointer
in updateTexImage (which should never happen) and return
an error.

Bug: 5111008

Change-Id: I5174a6ecbb0de641c6510ef56a611cbb4e9e1f59
urfaceTexture.h
2560d14ce8e38984032d999e3fdf8da9a47baf3c 11-Aug-2011 Mathias Agopian <mathias@google.com> rework dequeueBuffer()'s main loop.

this simplifies the code a bit and also makes sure
we reevaluate mAbandoned and mConnectedApi each time
we come back from waiting on mDequeueCondition

Change-Id: I1f8538b62ad321b51ed79d953b700036daba796d
urfaceTexture.h
ef51b992192adf4fc432686ab346f5fc7a13bc95 11-Aug-2011 Mathias Agopian <mathias@google.com> error out when SurfaceTexture APIs are called while not connected

- also log a warning when freeAllBuffers is called with a non empty buffer queue
- rename freeAllBuffers to freeAllBuffersLocked

Change-Id: Idb71fdcf233b9ccae62d5a2a7c3c4bad2501d877
urfaceTexture.h
5bfc24515bb5c8ea7975f72d538df37753733a2f 09-Aug-2011 Mathias Agopian <mathias@google.com> return correct value from query after connecting a surface

the first time a surface was connected, the values returned
by query NATIVE_WINDOW_DEFAULT_{WIDTH|HEIGHT} and
NATIVE_WINDOW_TRANSFORM_HINT were wrong until a call
to queueBuffer was performed.

Bug: 5137366, 5121607
Change-Id: I7ac6b5b0daa876638f6bed7c20f286a6e6d984f6
SurfaceTexture.h
urfaceTexture.h
96e108271bb5da44a130c8b5976fc63879403735 26-Jul-2011 Mathias Agopian <mathias@google.com> Merge "remove dead code and member variables."
3fbce7c56082e4e0d23f1c1c89983d3841853ed7 26-Jul-2011 Mathias Agopian <mathias@google.com> remove dead code and member variables.

also fix some comments and improve debugging logs.

Change-Id: I83e55309f306332b59e1ec46104c4a7fffbf3c97
urfaceTextureClient.h
fa1e002cec5dc33ebe52685dc81d644f783811a8 25-Jul-2011 Jamie Gennis <jgennis@google.com> Merge "SurfaceTexture: enable RGB external textures"
1f8e09f40d16ae377164d86e91385ad3d8e78e82 20-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: enable RGB external textures

This change removes support for conditionally using the GL_TEXTURE_2D
target for SurfaceTexture textures with RGB buffers. It also enables
and fixes the RGB-based SurfaceTexture tests.

Change-Id: I9a251a981cf66af6b048b2e4c3fe7231e4774f4d
urfaceTexture.h
7b305fffc39d0fe0926e7fd2d7f6a524fbce62b7 19-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: add the abandon method.

This change adds the 'abandon' method to the SurfaceTexture C++ class.
This method may be used to put the SurfaceTexture in an abandoned state,
causing all ISurfaceTexture methods to fail.

Change-Id: Ibd261f7b73f44e2bec36a8508bf92113cfb7cf95
SurfaceTexture.h
urfaceTexture.h
29c870271e8d3f8c40c356283650ba54fe71a16b 19-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix a comment

Change-Id: I799532f77f8fbb6b8ee6888fdd8852b6f28e8c33
urfaceTexture.h
976f494d53cb239307fd810ce592b5b5de1cbc41 19-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: remove getAllocator

This change removes the SurfaceTexture::getAllocator method, as it's no
longer needed. Proper refcounting of the Gralloc buffers is now handled
by the IGraphicBufferAlloc binder marshalling code.

Change-Id: I5cffa6ebfc1bc5828fb7ce0e0a5b2f55cd8479da
SurfaceTexture.h
urfaceTextureClient.h
c10d9d90b2088a3304076e0dc4bf05cdbb5d45ab 21-Jul-2011 Mathias Agopian <mathias@google.com> clean-up. get rid ofunused code and members in Surface[Control].cpp

Change-Id: Ia7790ae28af2c2ac99eae01c2c5044ace4a490a4
SurfaceTexture.h
97c602c5af5f3ffd69009bf496d86347b71a2b4c 20-Jul-2011 Mathias Agopian <mathias@google.com> implement: "Add an ANativeWindow API for SurfaceFlinger to suggest an optimal buffer orientation"

Bug: 4487161
Change-Id: I883f34efe542c2a566d04966f873374f40c50092
SurfaceTexture.h
urfaceTexture.h
urfaceTextureClient.h
7734ebfe47f42f980c1b44c1f284a91d8ad1d6c7 14-Jul-2011 Mathias Agopian <mathias@google.com> Add set_scaling_mode() to ANativeWindow.

This allows to specify the scaling mode independently from
the buffer size.

Change-Id: Iaa2baa660445531a97d3fac192e580f4929c5d3b
SurfaceTexture.h
urfaceTexture.h
urfaceTextureClient.h
8f9dbf9e13b927de2524116c30544f7dfbbbf56c 14-Jul-2011 Mathias Agopian <mathias@google.com> move lock/unlock implementaion outside of Surface into SurfaceTextureClient

This makes ANativeWindow_lock/ANativeWindow_unlockAndPost work
with ANativeWindows implemented by Surface and SurfaceTextureClient.

Also, Surface now inherits directly from SurfaceTextureClient.

Bug: 5003724
Change-Id: I9f285877c7bae9a262e9a7af91c2bae78804b2ef
urfaceTextureClient.h
677517ae3f380e701a47abe4738b748fb3ca161d 15-Jul-2011 Jamie Gennis <jgennis@google.com> Merge changes Id9aa1003,I8c154189

* changes:
SurfaceTexture: make (dis)connect into an IPC
SurfaceTexture: add support for new connect values
fe0a87b54654a1392650e7f1862df473287d8332 14-Jul-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: make (dis)connect into an IPC

This change makes the ANativeWindow connect and disconnect calls result
in an IPC to the SurfaceTexture object. This will allow us to prevent
multiple simultaneous connections from different processes.

Change-Id: Id9aa1003b1335b96ca6bd4a1f5a67aa433d42efb
SurfaceTexture.h
urfaceTexture.h
urfaceTextureClient.h
bee205fd58a27c10a0895de5339e76025d429d2b 01-Jul-2011 Jamie Gennis <jgennis@google.com> EGL: fix the ANativeWindow size/fmt override

This change fixes how the Android EGL layer overrides the size and
format of an ANativeWindow in eglCreateWindowSurface. The new behavior
is to leave the size untouched when overriding the format. The previous
behavior was to reset the ANativeWindow to use the default size set by
the ANativeWindow implementation.

It also adds two new 'perform' methods to the ANativeWindow interface:
set_buffers_dimensions and set_buffers_format, and redefines the
behavior of set_buffers_geometry to be the combination of these two new
methods.

Additionally, this change adds an error check for the return value of
the new native_window_set_buffers_format call, which required adding a
(stub) handler for to FramebufferNativeWindow.

Change-Id: I805c7ccd8d4730dfb132d10d8bc3fb058a0b9df1
urfaceTextureClient.h
19e0a8bfe9a15543b0bd7991cce08e5362e9f5cd 01-Jul-2011 Pannag Sanketi <psanketi@google.com> Merge "Minor fix in SurfaceTexture"
292a31a4c2ae2f6faf134e8e4a726583017dad06 24-Jun-2011 Pannag Sanketi <psanketi@google.com> Minor fix in SurfaceTexture

Change-Id: Ic859715becf3e6d5107bd8beb8c577034d00ec52
urfaceTexture.h
3d8063b02e06020c8062addcc9ec49048d3bdb9a 27-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: change onFrameAvailable behavior

This change alters the conditions under which the onFrameAvailable
callback gets called by the C++ SurfaceTexture class. The new behavior
is to call the callback whenever a frame gets queued that will be
visible to the buffer consumer. This means that buffers queued in
synchronous mode always trigger the callback, as those buffers will
remain pending until they are consumed. Buffers queued in asynchronous
mode will only trigger the callback if there was not previously an
unconsumed buffer pending.

The new behavior means that a consumer should perform a draw operation
exactly once for every onFrameAvailable call that it recieves. This
change also modifies SurfaceFlinger and the SurfaceTexture JNI to
support of the new behavior.

Change-Id: I8b2c6e00961d3d58b11c6af50b555b6e4c5f5b40
urfaceTexture.h
14a0e58074f2698829b6554f578e6762c377caa3 24-Jun-2011 Grace Kloba <klobag@google.com> Add allowSynchronousMode to SurfaceTexture constructor.

Change-Id: I54f30a3c16bbe6b813f3bcd1d389da5627531304
urfaceTexture.h
1c4414091cfb93206067fb64eba445653739d40f 20-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix a NULL ptr dereference.

This change adds a NULL check when searching the slot list in
SurfaceTextureClient for the slot corresponding to a buffer being
queued or canceled.

Bug: 4645023
Change-Id: I806cbc1e34da118ea33a83c4f25ce8193ba1c3ad
urfaceTextureClient.h
ae468f43418c3cbae74c7f546283f6bb4e4df690 12-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix up a comment.

Change-Id: I044e44e17319e08af657a7ec9fa39100876fe862
urfaceTexture.h
736aa9573bb7b78f9c315f396c104491b3639426 13-Jun-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: fix a getTransformMatrix crash.

This change moves the computation of the transform matrix out of
getTransformMatrix and instead performs the computation when
updateTexImage gets called. This is needed in order for
getTransformMatrix to succeed even if the buffers have been freed (e.g.
by changing the buffer count) because the computation depends upon the
properties of the current GraphicBuffer.

Change-Id: Ied541ab8747b7ad604f862717135f9a16a816be9
Bug: 4490420
urfaceTexture.h
b62013f6aafee08cfad25a2712dc32264e44f783 18-May-2011 Mathias Agopian <mathias@google.com> 9-axis sensor fusion with Kalman filter

Add support for 9-axis gravity and linear-acceleration sensors
virtual orientation sensor using 9-axis fusion

Change-Id: I6717539373fce781c10e97b6fa59f68a831a592f
ensor.h
8cd5ba4b7f01d3a54a8f8bc6d1793aa5fc8e09ef 19-May-2011 Jamie Gennis <jgennis@google.com> SurfaceTexture: clean up some comments, tests, etc.

This change fixes up some stale comments, member variable names, log
messages and disables a failing test.

Change-Id: Ic1d3344b18066cf710e4a42838b2417c6b1f2f6c
urfaceTexture.h
cf46eb9817dfbfc020720d1e45b5c085252500fb 12-May-2011 Mathias Agopian <mathias@google.com> fix onFrameAvailable

Change-Id: I391fe9f6684ac9fd4f91416ce18b583f7087d966
urfaceTexture.h
68c7794183a7dbfe3b20d4ce832f8eb79c2c619a 10-May-2011 Mathias Agopian <mathias@google.com> Add SurfaceTexture logging

Change-Id: If1b74be5230813fb76429935d88b9d4a7c41700c
urfaceTexture.h
8072711307aa98ee5ee6f7369860ae38c3e19656 03-May-2011 Mathias Agopian <mathias@google.com> Implement {Surface|SurfaceTextureClient}::setSwapInterval()

Change-Id: I8382e346ddaa2c4c8ff56ac3ffd7f0109572f188
SurfaceTexture.h
urfaceTexture.h
urfaceTextureClient.h
b3e518c820c7dbe35587bd45c510e4e5e7cfd9c9 22-Apr-2011 Mathias Agopian <mathias@google.com> Add the concept of synchronous dequeueBuffer in SurfaceTexture

Change-Id: Ic94cbab092953243a0746e04bbe1b2eb0cc930ef
urfaceTexture.h
eafabcdc1639fb96062d9e3c39b0ae27b0238ae1 20-Apr-2011 Mathias Agopian <mathias@google.com> unify SurfaceTexture and Surface

Change-Id: I49da2f5d8408e4cd7e148cfb777bb4ff68cd8f37
SurfaceTexture.h
urfaceTexture.h
c04f153353cdb0d291297d10452239f791d3fd2b 26-Apr-2011 Mathias Agopian <mathias@google.com> Fix a bug where setgeometry couldn't be undone

This change the binder protocol between SurfaceTextureClient
and SurfaceTexture. dequeueBuffer() now takes the requested
parameters for the buffer. SurfaceTexture decides if the
buffer needs to be reallocated and does the allocation
if needed. In that case it returns BUFFER_NEEDS_REALLOCATION
to tell SurfaceTextureClient that it needs to call
requestBuffer (which all parameters have been removed) to
acquire a pointer to the buffer.

dequeueBuffer and requestBuffer could be folded into a single
IPC call, but we chose to optimize the case where buffers are
not created and avoid some complexity in the marshalling code.

Change-Id: I097a7f6f40a3491e10f3f3742eab33999286c304
SurfaceTexture.h
urfaceTexture.h
697526bc9e44ce61c88614f98387ae8bbf0a187e 01-May-2011 Iliyan Malchev <malchev@google.com> frameworks/base: android_native_buffer_t -> ANativeWindowBuffer

Change-Id: Idc2eabaa805bb6d308ebb315872623f28d428417
Signed-off-by: Iliyan Malchev <malchev@google.com>
urfaceTextureClient.h
41abd67302b52aefadc2b3dea42226f16bf6d9ba 15-Apr-2011 Iliyan Malchev <malchev@google.com> frameworks/base: make the ANativeWindow query() method const

query() does not modify the object's data, so it needs to be a const method

Change-Id: I67c40a3c865461e6f1cc2193fd2d74286ff6ac8f
Signed-off-by: Iliyan Malchev <malchev@google.com>
urfaceTextureClient.h
7e3d7f341ab3789fe25064670374159a35e35ed3 19-Apr-2011 Mathias Agopian <mathias@google.com> Merge "changes to SurfaceTexture needed for unification with SF"
7a042bf324fe3f3d5d4085fda21fe50dc0c362b4 12-Apr-2011 Mathias Agopian <mathias@google.com> changes to SurfaceTexture needed for unification with SF

- implement connect/disconnect
- implement missing query
- handle texture_2d in addition to texture_external_oes

Change-Id: I971a70821f00f22b01f5337de4a7d451177fec4d
urfaceTexture.h
urfaceTextureClient.h
4cb18881b55b82a24873ccd8e298bc2d5a9c17e5 09-Apr-2011 Mathias Agopian <mathias@google.com> Fix a GraphicBuffer leak in SurfaceTexture

This leak was intentional, it was there to deal with the fact that
some gralloc implementations don't track buffer handles with
file-descriptors so buffers needed to stay alive until there were
registered, which is not guaranteed by binder transactions.

In this new implementation, we use a small BBinder holding a
reference to the buffer, which with tuck into the parcel. This forces
the reference to stay alive until the parcel is destroyed, which
is guaranteed (by construction) to happen after the buffer is
registered.

this allows the public facing API to not expose the previous hack.

Change-Id: I1dd6cd83679a2b7457ad628169e2851acc027143
urfaceTexture.h
a5c75c01620179ce00812354778a29a80d76e71f 01-Apr-2011 Mathias Agopian <mathias@google.com> SurfaceTexture can now force the client to request a buffer

SurfaceTexture now has the concept of default size a new method,
setDefaultBufferSize() to set it. When the default size is
changed, dequeueBuffer() will return a value telling the
client that it must ask for a new buffer.

The above only applies if the client has not
overriden the buffer size with setGeometry.

Change-Id: I520dc40363054b7e37fdb67d6a2e7bce70326e81
SurfaceTexture.h
urfaceTexture.h
1d01a12e7150be569557b64da9b8663c62c13594 18-Feb-2011 Eino-Ville Talvala <etalvala@google.com> Add support for timestamps into SurfaceTexture.

API addition: The timestamps are represented as nanoseconds from some
arbitrary time point. Like the SurfaceTexture transform matrix, the
timestamp retrieved by getTimestamp is for the last frame sent to the
GL texture using updateTexImage().

Camera HAL change: Expect vendors to set these timestamps using
native_window_set_buffers_timestamp(). For now, they are
autogenerated by SurfaceTextureClient if set_buffers_timestamp() is
never called, but such timing is likely not accurate enough to pass a
CTS test.

bug:3300707

Change-Id: Ife131a0c2a826ac27342e11b8a6c42ff49e1bea7
SurfaceTexture.h
urfaceTexture.h
urfaceTextureClient.h
bae774eb20bebd409441b93386b51bccda75f546 14-Mar-2011 Jamie Gennis <jgennis@google.com> SurfaceTextureClient: Add ISurfaceTexture getter.

This change adds a getter method to SurfaceTextureClient to get the
ISurfaceTexture object with which the SurfaceTextureClient is
communicating.

Bug: 4086509
Change-Id: Ifec621e0fe5392a5be56b2348fdc54067cbebcdd
urfaceTextureClient.h
9d4d6c101d90d4a1d1ca9413cf3eb89d1f1898d6 27-Feb-2011 Jamie Gennis <jgennis@google.com> Add the MIN_UNDEQUEUED_BUFFERS query to ANW.

This change adds a new query to ANativeWindow for getting the minimum
number of buffers that must be left un-dequeued during the steady-state
operation of the ANativeWindow.

Change-Id: Ie8c461fc26b02ecde02ddb4f95bf763662cf1551
Related-Bug: 3356050
urfaceTexture.h
urfaceTextureClient.h
1b20cde313b5ef8acdace742328df867956d24cb 03-Feb-2011 Jamie Gennis <jgennis@google.com> Pass the IGraphicBufferAlloc to SurfaceTextureClient.

This change passes a reference to the IGraphicBufferAlloc binder object
to SurfaceTextureClient objects. When STC objects are created they
query their associated ISurfaceTexture object for the
IGraphicBufferAlloc that the SurfaceTexture uses to allocate buffers.
Having the SurfaceTextureClient hold this reference prevents the
GraphicBufferAlloc in SurfaceFlinger from freeing the allocated buffers
before the SurfaceTextureClient is done with them.

Change-Id: Ib8e30e8b37fdd60438cbb4cb7e9174d0ba6d661c
related-bug: 3362519
SurfaceTexture.h
urfaceTexture.h
urfaceTextureClient.h
c4d4aeab52435c177ded6abdd578fec8191f0f5d 13-Jan-2011 Jamie Gennis <jgennis@google.com> Implement SurfaceTexture frame-available callback.

This change implements the onFrameAvailable callback for the
SurfaceTexture java class. It includes the C++ SurfaceTexture code as
well as the JNI and Java code to enable the callback.

Change-Id: Ifd8b8e7ad46ee70cba6da1c2e96dab8045d1ea30
urfaceTexture.h
9a78c90cd46b2a3bd637b056873149d3b94384b4 13-Jan-2011 Jamie Gennis <jgennis@google.com> Fix remote GraphicBuffer allocation in SurfaceFlinger.

This change fixes a horrible hack that I did to allow application
processes to create GraphicBuffer objects by making a binder call to
SurfaceFlinger. This change introduces a new binder interface
specifically for doing this, and does it in such a way that
SurfaceFlinger will maintain a reference to the buffers until the app is
done with them.

Change-Id: Icb240397c6c206d7f69124c1497a829f051cb49b
urfaceTexture.h
f238e28500ca756fbd9e323f728ce7c8dda59475 10-Jan-2011 Jamie Gennis <jgennis@google.com> Implement crop & transform for SurfaceTexture.

This change adds support for the setCrop and setTransform methods of the
SurfaceTexture C++ class. The crop and transform for the current
texture will be accessed by applications as a single texture coordinate
transform matrix.

Change-Id: I6482bf96f680e5c175364e848936db3908d6c8f8
urfaceTexture.h
67eedd74ab78c2bfed9fcdc74947b97289254ca4 09-Jan-2011 Jamie Gennis <jgennis@google.com> Fix a bug in SurfaceTexture::setBufferCount.

We need to reset mCurrentTexture and mLastQueued in setBufferCount
because it frees all of the buffers associated with the buffer slots.

Change-Id: Ie2f834ec1c07ce7a4ab9b2b5fc5fe8c294010c60
urfaceTexture.h
8ba32fade11abb73f3fd47ea0953c9528eb5b91f 20-Dec-2010 Jamie Gennis <jgennis@google.com> Add the SurfaceTexture C++ implementation.

This change adds the C++ implementation of SurfaceTexture and related
classes. The goal of this is for a SurfaceTexture to be passed to
camera service or Stagefright in place of a Surface to allow camera
preview or decoded video frames to be streamed to an OpenGL ES texture
that an application can use.

Change-Id: I55c83a7017f1ecb81c9c9e3252cbd118b914296c
SurfaceTexture.h
urfaceTexture.h
urfaceTextureClient.h
59abe7e0909bf4b7bf7b9601e1e40a05f6d4fd8a 14-Sep-2010 Jeff Brown <jeffbrown@google.com> Replace epoll() with poll() and rename PollLoop to Looper.

As part of this change, consolidated and cleaned up the Looper API so
that there are fewer distinctions between the NDK and non-NDK declarations
(no need for two callback types, etc.).

Removed the dependence on specific constants from sys/poll.h such as
POLLIN. Instead looper.h defines events like LOOPER_EVENT_INPUT for
the events that it supports. That should help make any future
under-the-hood implementation changes easier.

Fixed a couple of compiler warnings along the way.

Change-Id: I449a7ec780bf061bdd325452f823673e2b39b6ae
ensorEventQueue.h
a48bcf62b6a26f24a0bdd2b44bb39fadce499e92 30-Jul-2010 Mathias Agopian <mathias@google.com> Added SensorManager.getMinDelay()

Exposed the new "min delay" sensor property through native and
java sensor apis. This allows the caller to know what is the
maximum rate at which a sensor can return events, or, if a sensor
works in "update" mode (events returned only when the value changes).

Also augmented SensorManager.regusterSensorEvent() so that it can
accept a value in microsecond in addition to the 4 constants already
defined.

Change-Id: If425e9979892666df8c989d7de3c362230fa19e0
ensor.h
ensorEventQueue.h
e3c8234765050023b8a588607f819e8cc41a6363 22-Jul-2010 Mathias Agopian <mathias@google.com> propagate sensor event rate properly

Change-Id: I32e67d30e4295285a6827956cc8161b2025d70bc
ensorEventQueue.h
a7352c9f4a6e642c29782b19db5bc0bd98feddc8 15-Jul-2010 Mathias Agopian <mathias@google.com> new SensorService

remove old sensor service and implement SensorManager
on top of the new (native) SensorManger API.

Change-Id: Iddb77d498755da3e11646473a44d651f12f40281
SensorServer.h
ensor.h
ensorEventQueue.h
ensorManager.h
589ce85ee4174829cfedce91b6b2509d2a4002eb 14-Jul-2010 Mathias Agopian <mathias@google.com> first step at implementing the native sensor support

in this commit:
- implemented the C stub
- implemented the binder interfaces involved
- implemented most of the C++ client side

missing:
- SensorManager cannot connect to the SensorServer yet
(because there is no SensorServer yet)

Change-Id: I75010cbeef31c98d6fa62fd5d388dcef87c2636b
SensorEventConnection.h
SensorServer.h
ensor.h
ensorChannel.h
ensorEventQueue.h
ensorManager.h