commit | cf3834db104e0b052056e3a06d46e3f222f0d372 | [log] [tgz] |
---|---|---|
author | Dan Stoza <stoza@google.com> | Wed Mar 11 14:04:22 2015 -0700 |
committer | Dan Stoza <stoza@google.com> | Thu Mar 19 13:58:07 2015 -0700 |
tree | 7f8bdabc545370935e0f4fbde18b1a92a427144d | |
parent | 82c6bcc9705eabcaf5b9e45bc81867b0e2d61a02 [diff] [blame] |
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
diff --git a/libs/gui/BufferQueueConsumer.cpp b/libs/gui/BufferQueueConsumer.cpp index 526c3b7..821a744 100644 --- a/libs/gui/BufferQueueConsumer.cpp +++ b/libs/gui/BufferQueueConsumer.cpp
@@ -176,6 +176,22 @@ return NO_ERROR; } +status_t BufferQueueConsumer::acquireBuffer(android::BufferItem* outBuffer, + nsecs_t expectedPresent) { + if (outBuffer == nullptr) { + return BAD_VALUE; + } + + BufferItem item; + status_t result = acquireBuffer(&item, expectedPresent); + if (result != NO_ERROR) { + return result; + } + + *outBuffer = item; + return NO_ERROR; +} + status_t BufferQueueConsumer::detachBuffer(int slot) { ATRACE_CALL(); ATRACE_BUFFER_INDEX(slot);