From dd26416fe135f93ef2c8570738f8e1ca5e2ca3a3 Mon Sep 17 00:00:00 2001 From: Dan Stoza Date: Thu, 12 Mar 2015 13:58:47 -0700 Subject: libgui: Prepare for IGBC::BufferItem removal Switches some dependencies from IGraphicBufferConsumer::BufferItem to android::BufferItem and adds some methods to facilitate incrementally changing client code to do the same. Change-Id: I699ed0a6837076867ca756b28d1ffb2238f7a0d9 --- include/gui/BufferItemConsumer.h | 6 ++++-- include/gui/ConsumerBase.h | 4 ++-- include/gui/GLConsumer.h | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'include/gui') diff --git a/include/gui/BufferItemConsumer.h b/include/gui/BufferItemConsumer.h index 45f329e..57e121e 100644 --- a/include/gui/BufferItemConsumer.h +++ b/include/gui/BufferItemConsumer.h @@ -76,8 +76,10 @@ class BufferItemConsumer: public ConsumerBase // // If waitForFence is true, and the acquired BufferItem has a valid fence object, // acquireBuffer will wait on the fence with no timeout before returning. - status_t acquireBuffer(BufferItem *item, nsecs_t presentWhen, - bool waitForFence = true); + status_t acquireBuffer(BufferQueue::BufferItem *item, nsecs_t presentWhen, + bool waitForFence = true); + status_t acquireBuffer(android::BufferItem* item, nsecs_t presentWhen, + bool waitForFence = true); // Returns an acquired buffer to the queue, allowing it to be reused. Since // only a fixed number of buffers may be acquired at a time, old buffers diff --git a/include/gui/ConsumerBase.h b/include/gui/ConsumerBase.h index f7ab5ac..46ad20e 100644 --- a/include/gui/ConsumerBase.h +++ b/include/gui/ConsumerBase.h @@ -153,8 +153,8 @@ protected: // initialization that must take place the first time a buffer is assigned // to a slot. If it is overridden the derived class's implementation must // call ConsumerBase::acquireBufferLocked. - virtual status_t acquireBufferLocked(IGraphicBufferConsumer::BufferItem *item, - nsecs_t presentWhen); + virtual status_t acquireBufferLocked(BufferItem *item, nsecs_t presentWhen); + virtual status_t acquireBufferLocked(BufferQueue::BufferItem *item, nsecs_t presentWhen); // releaseBufferLocked relinquishes control over a buffer, returning that // control to the BufferQueue. diff --git a/include/gui/GLConsumer.h b/include/gui/GLConsumer.h index bf9eb24..167ef20 100644 --- a/include/gui/GLConsumer.h +++ b/include/gui/GLConsumer.h @@ -241,8 +241,8 @@ protected: // acquireBufferLocked overrides the ConsumerBase method to update the // mEglSlots array in addition to the ConsumerBase behavior. - virtual status_t acquireBufferLocked(BufferQueue::BufferItem *item, - nsecs_t presentWhen); + virtual status_t acquireBufferLocked(BufferItem *item, nsecs_t presentWhen); + virtual status_t acquireBufferLocked(IGraphicBufferConsumer::BufferItem *item, nsecs_t presentWhen); // releaseBufferLocked overrides the ConsumerBase method to update the // mEglSlots array in addition to the ConsumerBase. -- cgit v1.1