libgui: Add a union to BufferItem for refactoring

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, so this change modifies
the one inside of libgui to have a union of both names so that the
one inside of IGBC can eventually be refactored away.

Change-Id: I64f495105f56cbf5803cea4aa6b072ea29b70cf5
This commit is contained in:
Dan Stoza 2015-03-11 14:04:22 -07:00
parent 35283ef01b
commit 358fc008f3

View File

@ -86,9 +86,14 @@ class BufferItem : public Flattenable<BufferItem> {
// mFrameNumber is the number of the queued frame for this slot. // mFrameNumber is the number of the queued frame for this slot.
uint64_t mFrameNumber; uint64_t mFrameNumber;
union {
// mSlot is the slot index of this buffer (default INVALID_BUFFER_SLOT). // mSlot is the slot index of this buffer (default INVALID_BUFFER_SLOT).
int mSlot; int mSlot;
// mBuf is the former name for mSlot
int mBuf;
};
// mIsDroppable whether this buffer was queued with the // mIsDroppable whether this buffer was queued with the
// property that it can be replaced by a new buffer for the purpose of // property that it can be replaced by a new buffer for the purpose of
// making sure dequeueBuffer() won't block. // making sure dequeueBuffer() won't block.