diff options
author | Mathias Agopian <mathias@google.com> | 2013-03-26 18:15:35 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2013-03-26 18:15:35 -0700 |
commit | 8000d0694bc34bc17d869da546d8ff8790ae7be4 (patch) | |
tree | 9b1f6afe40b9648efddea30ccee71961a1a78e5f /libs | |
parent | 437bdbbaec76099b8b4582aa9f965e60b3f3cdb6 (diff) | |
download | frameworks_native-8000d0694bc34bc17d869da546d8ff8790ae7be4.zip frameworks_native-8000d0694bc34bc17d869da546d8ff8790ae7be4.tar.gz frameworks_native-8000d0694bc34bc17d869da546d8ff8790ae7be4.tar.bz2 |
make sure to unlock the screenshot's buffer on destruction
this fixes a memory leak on various devices
Bug: 8475134
Change-Id: I25924674c803a0cb22371a95c60664c36acb0340
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index ec46fce..f345df8 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -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); |