Loading libs/gui/ConsumerBase.cpp +10 −24 Original line number Diff line number Diff line Loading @@ -109,9 +109,6 @@ void ConsumerBase::onFrameAvailable() { } void ConsumerBase::onBuffersReleased() { sp<GraphicBuffer> bufRefs[BufferQueue::NUM_BUFFER_SLOTS]; { // Scope for the lock Mutex::Autolock lock(mMutex); CB_LOGV("onBuffersReleased"); Loading @@ -125,22 +122,11 @@ void ConsumerBase::onBuffersReleased() { mBufferQueue->getReleasedBuffers(&mask); for (int i = 0; i < BufferQueue::NUM_BUFFER_SLOTS; i++) { if (mask & (1 << i)) { // Grab a local reference to the buffers so that they don't // get freed while the lock is held. bufRefs[i] = mSlots[i].mGraphicBuffer; freeBufferLocked(i); } } } // Clear the local buffer references. This would happen automatically // when the array gets dtor'd, but I'm doing it explicitly for clarity. for (int i = 0; i < BufferQueue::NUM_BUFFER_SLOTS; i++) { bufRefs[i].clear(); } } void ConsumerBase::abandon() { CB_LOGV("abandon"); Mutex::Autolock lock(mMutex); Loading Loading
libs/gui/ConsumerBase.cpp +10 −24 Original line number Diff line number Diff line Loading @@ -109,9 +109,6 @@ void ConsumerBase::onFrameAvailable() { } void ConsumerBase::onBuffersReleased() { sp<GraphicBuffer> bufRefs[BufferQueue::NUM_BUFFER_SLOTS]; { // Scope for the lock Mutex::Autolock lock(mMutex); CB_LOGV("onBuffersReleased"); Loading @@ -125,22 +122,11 @@ void ConsumerBase::onBuffersReleased() { mBufferQueue->getReleasedBuffers(&mask); for (int i = 0; i < BufferQueue::NUM_BUFFER_SLOTS; i++) { if (mask & (1 << i)) { // Grab a local reference to the buffers so that they don't // get freed while the lock is held. bufRefs[i] = mSlots[i].mGraphicBuffer; freeBufferLocked(i); } } } // Clear the local buffer references. This would happen automatically // when the array gets dtor'd, but I'm doing it explicitly for clarity. for (int i = 0; i < BufferQueue::NUM_BUFFER_SLOTS; i++) { bufRefs[i].clear(); } } void ConsumerBase::abandon() { CB_LOGV("abandon"); Mutex::Autolock lock(mMutex); Loading