699a32bcdfaf0390a269a275b979d46ca815654a |
|
18-May-2015 |
Michael Lentine <mlentine@google.com> |
Merge "Refactor ConsumerBase and it's derived classes." into mnc-dev
|
847f11e215e86b107ab50c1359fc7bc3cd7a3a11 |
|
18-May-2015 |
Michael Lentine <mlentine@google.com> |
Refactor ConsumerBase and it's derived classes. Move setDefaultBufferSize, setDefaultBufferFormat, and setDefaultBufferDataSpace into ConsumerBase and remove them from CpuConsumer and BufferItemConsumer. Bug: 19977701 Change-Id: Ic68992464c5da6da7a41c4063a53029a69efcd1b
/frameworks/native/include/gui/ConsumerBase.h
|
e478305181bb8dc8706361bc702256fe73f958de |
|
15-May-2015 |
John Reck <jreck@google.com> |
Add ConsumerBase::isAbandoned Bug: 20105644 Change-Id: I21526b5397ea51a15500c44a99daa9d75fc4ea67
/frameworks/native/include/gui/ConsumerBase.h
|
a4650a50a0b35e9e4342d6600b6eb24fd94bb8e5 |
|
12-May-2015 |
Dan Stoza <stoza@google.com> |
Fix PTS handling for buffer replacement This changes the way that SurfaceFlinger's shadow buffer management works such that instead of tracking the size of the shadow queue in the BufferQueue, SF tracks the last frame number it has seen, and passes that into the acquireBuffer call. BufferQueueConsumer then ensures that it never returns a buffer newer than that frame number, even if that means that it must return PRESENT_LATER for an otherwise valid buffer. Change-Id: I3fcb45f683ed660c3f18a8b85ae1f8a962ba6f0e
/frameworks/native/include/gui/ConsumerBase.h
|
dc13c5b85b099050c73297a19f1ef89308f7620b |
|
12-May-2015 |
Dan Stoza <stoza@google.com> |
libgui: Hook up onFrameReplaced This completes the plumbing from ConsumerListener::onFrameReplaced into SurfaceFlinger (and other consumers that may care). Change-Id: I376e78ace95d6748e8662e6b4d47c0dfa697a300
/frameworks/native/include/gui/ConsumerBase.h
|
634f5ee6a713b3cf4086a2af8e9b56e76cba245f |
|
03-Apr-2015 |
Dan Stoza <stoza@google.com> |
libgui: Plumb detachBuffer through ConsumerBase Exposes IGraphicBufferConsumer::detachBuffer as a ConsumerBase method. attachBuffer is not currently exposed, because all current clients will be recycling buffers through the allocator. Bug: 19628705 Change-Id: I3e519767fa43d5d880c1d5695e31b60f6ad588af
/frameworks/native/include/gui/ConsumerBase.h
|
1c87e474d87d6d1380fb61d476d606b1a2fda1c1 |
|
13-Mar-2015 |
Dan Stoza <stoza@google.com> |
DO NOT MERGE libgui: Remove IGBC::BufferItem Removes IGraphicBufferConsumer::BufferItem. Depends on the following changes: I187b3a7d05196b6289596afac8fb9a9d4aebff76 I0ddd38df37500cfd6b21d1e768ed14e39c5cd9fc Cherry-pick of Id1fa56d092188f2cb712768d5d2fc6a9027fb73c Change-Id: I3edf0db8fba656fd78e18a5a7f1137f0fb6b237d
/frameworks/native/include/gui/ConsumerBase.h
|
cf3834db104e0b052056e3a06d46e3f222f0d372 |
|
11-Mar-2015 |
Dan Stoza <stoza@google.com> |
DO NOT MERGE libgui: Prepare for IGBC::BufferItem removal Currently, there are two instances of BufferItem: one inside of IGraphicBufferConsumer, and a standalone one inside of libgui. They only differ in the name of one of the fields, and we want to remove the IGBC version. This changes things so that client code may be incrementally switched over to the libgui version. This is a squashed commit containing the following changes: I64f495105f56cbf5803cea4aa6b072ea29b70cf5 I1394e693314429ada93427889f10b7b01c948053 I9c3bc8037fa9438d4d9080b8afb694219ef2f71f I699ed0a6837076867ca756b28d1ffb2238f7a0d9 Iac8425e1241774304a131da2fb9dec6e82922f13 Change-Id: Ic4d51f5df6dbc70b376d13fceba2335b9bae4f3d
/frameworks/native/include/gui/ConsumerBase.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
/frameworks/native/include/gui/ConsumerBase.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
/frameworks/native/include/gui/ConsumerBase.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
/frameworks/native/include/gui/ConsumerBase.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
/frameworks/native/include/gui/ConsumerBase.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
/frameworks/native/include/gui/ConsumerBase.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
/frameworks/native/include/gui/ConsumerBase.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
/frameworks/native/include/gui/ConsumerBase.h
|
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
/frameworks/native/include/gui/ConsumerBase.h
|
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
/frameworks/native/include/gui/ConsumerBase.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
/frameworks/native/include/gui/ConsumerBase.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
/frameworks/native/include/gui/ConsumerBase.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
/frameworks/native/include/gui/ConsumerBase.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
/frameworks/native/include/gui/ConsumerBase.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
/frameworks/native/include/gui/ConsumerBase.h
|
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
/frameworks/native/include/gui/ConsumerBase.h
|
ce7a6c0fc9d75b80da030d1790321e84475f956a |
|
20-Aug-2012 |
Jamie Gennis <jgennis@google.com> |
Revert "SurfaceTexture: inherit from ConsumerBase" This reverts commit ed059a8d754770c3cf28b78dba30f7a6ba475dbe Change-Id: I72542c2595771a40c2c88251e0d6eb54e305b99b
/frameworks/native/include/gui/ConsumerBase.h
|
ed059a8d754770c3cf28b78dba30f7a6ba475dbe |
|
08-Aug-2012 |
Jamie Gennis <jgennis@google.com> |
SurfaceTexture: inherit from ConsumerBase This change makes SurfaceTexture inherit from ConsumerBase. It removes all of the functionality from SurfaceTexture that is now provided by the base class. Change-Id: I4a881df42810a14ee32d4ef7c8772a8f2510f4c7
/frameworks/native/include/gui/ConsumerBase.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
/frameworks/native/include/gui/ConsumerBase.h
|