OSDN Git Service

ConsumerBase: free buffers outside the lock
authorJamie Gennis <jgennis@google.com>
Fri, 7 Dec 2012 01:51:53 +0000 (17:51 -0800)
committerJamie Gennis <jgennis@google.com>
Fri, 7 Dec 2012 02:17:35 +0000 (18:17 -0800)
commitb21a4e3b5f7f07ed160ca6e1809313e2a8e2a6a4
treea27b96ec4dac41a3682c9d62f3661738e0308442
parentefd614b869e952792b009db4ab54f3bb4375d198
ConsumerBase: free buffers outside the lock

This change makes ConsumerBase::onBuffersReleased hold a reference to all its
gralloc buffers until after the mutex is unlocked.  This prevents slow
gralloc::free calls from causing lock contention with rendering threads.

Bug: 7675940
Change-Id: I0ec805d1b612afeeecfffec03f982371d27d93be
libs/gui/ConsumerBase.cpp