am caa81f0e: Merge "make sure to unlock the screenshot\'s buffer on destruction" into jb-mr2-dev

* commit 'caa81f0ed8a4471c210956d0343458b3bca922de':
  make sure to unlock the screenshot's buffer on destruction
This commit is contained in:
Mathias Agopian 2013-03-26 18:32:39 -07:00 committed by Android Git Automerger
commit 4fbb8191d8
2 changed files with 5 additions and 0 deletions

View File

@ -170,6 +170,7 @@ private:
public:
ScreenshotClient();
~ScreenshotClient();
// frees the previous screenshot and capture a new one
status_t update(const sp<IBinder>& display);

View File

@ -627,6 +627,10 @@ ScreenshotClient::ScreenshotClient()
memset(&mBuffer, 0, sizeof(mBuffer));
}
ScreenshotClient::~ScreenshotClient() {
ScreenshotClient::release();
}
sp<CpuConsumer> ScreenshotClient::getCpuConsumer() const {
if (mCpuConsumer == NULL) {
mCpuConsumer = new CpuConsumer(1);