diff options
author | Lajos Molnar <lajos@google.com> | 2013-05-03 14:50:50 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-05-23 22:17:54 +0000 |
commit | c5d7b7d323bba8772a9005f7d300ad983a04733a (patch) | |
tree | 07479c25735c0bbaccd497db21a90a87c3926242 /libs/gui/CpuConsumer.cpp | |
parent | d837969640efbc97eda2034c7811dda807d4174f (diff) | |
download | frameworks_native-c5d7b7d323bba8772a9005f7d300ad983a04733a.zip frameworks_native-c5d7b7d323bba8772a9005f7d300ad983a04733a.tar.gz frameworks_native-c5d7b7d323bba8772a9005f7d300ad983a04733a.tar.bz2 |
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
Diffstat (limited to 'libs/gui/CpuConsumer.cpp')
-rw-r--r-- | libs/gui/CpuConsumer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/gui/CpuConsumer.cpp b/libs/gui/CpuConsumer.cpp index 0543649..0834361 100644 --- a/libs/gui/CpuConsumer.cpp +++ b/libs/gui/CpuConsumer.cpp @@ -189,7 +189,9 @@ status_t CpuConsumer::releaseAcquiredBufferLocked(int lockedIdx) { // disconnected after this buffer was acquired. if (CC_LIKELY(mAcquiredBuffers[lockedIdx].mGraphicBuffer == mSlots[buf].mGraphicBuffer)) { - releaseBufferLocked(buf, EGL_NO_DISPLAY, EGL_NO_SYNC_KHR); + releaseBufferLocked( + buf, mAcquiredBuffers[lockedIdx].mGraphicBuffer, + EGL_NO_DISPLAY, EGL_NO_SYNC_KHR); } AcquiredBuffer &ab = mAcquiredBuffers.editItemAt(lockedIdx); |