diff options
author | Dan Stoza <stoza@google.com> | 2014-03-11 23:47:14 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-03-11 23:47:15 +0000 |
commit | c9ed7d376882ff3c32913473fecd729c804dad0e (patch) | |
tree | 82bf721ff883badc8953cec01dce566a44335890 /services | |
parent | e98151e004fa57184c3e688e268f8b9c36c41f8a (diff) | |
parent | 9f3053de78630815d60cf48a2cf2348cc5867c45 (diff) | |
download | frameworks_native-c9ed7d376882ff3c32913473fecd729c804dad0e.zip frameworks_native-c9ed7d376882ff3c32913473fecd729c804dad0e.tar.gz frameworks_native-c9ed7d376882ff3c32913473fecd729c804dad0e.tar.bz2 |
Merge "BufferQueue: Allow detaching/reattaching buffers"
Diffstat (limited to 'services')
-rw-r--r-- | services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp | 9 | ||||
-rw-r--r-- | services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp index a1820ab..de0d16d 100644 --- a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp +++ b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.cpp @@ -374,6 +374,15 @@ status_t VirtualDisplaySurface::dequeueBuffer(int* pslot, sp<Fence>* fence, bool return result; } +status_t VirtualDisplaySurface::detachBuffer(int slot) { + return mSource[SOURCE_SINK]->detachBuffer(slot); +} + +status_t VirtualDisplaySurface::attachBuffer(int* outSlot, + const sp<GraphicBuffer>& buffer) { + return mSource[SOURCE_SINK]->attachBuffer(outSlot, buffer); +} + status_t VirtualDisplaySurface::queueBuffer(int pslot, const QueueBufferInput& input, QueueBufferOutput* output) { VDS_LOGW_IF(mDbgState != DBG_STATE_GLES, diff --git a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h index 6899904..cd9a5b0 100644 --- a/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h +++ b/services/surfaceflinger/DisplayHardware/VirtualDisplaySurface.h @@ -98,6 +98,8 @@ private: virtual status_t setBufferCount(int bufferCount); virtual status_t dequeueBuffer(int* pslot, sp<Fence>* fence, bool async, uint32_t w, uint32_t h, uint32_t format, uint32_t usage); + virtual status_t detachBuffer(int slot); + virtual status_t attachBuffer(int* slot, const sp<GraphicBuffer>& buffer); virtual status_t queueBuffer(int pslot, const QueueBufferInput& input, QueueBufferOutput* output); virtual void cancelBuffer(int pslot, const sp<Fence>& fence); |