summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-11-18 15:22:59 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-11-18 15:22:59 -0800
commit8bee68fac2dba0a72a58a243601d5d7d12e116e6 (patch)
treea1ea7708d0e34e0d04004e5180381e192a0c2f64
parentfc725ff099799332a066445344264ea4e6f7f6eb (diff)
parentc4dd3a44c690519931ef231ddffc32cfc81393d5 (diff)
downloadframeworks_native-8bee68fac2dba0a72a58a243601d5d7d12e116e6.zip
frameworks_native-8bee68fac2dba0a72a58a243601d5d7d12e116e6.tar.gz
frameworks_native-8bee68fac2dba0a72a58a243601d5d7d12e116e6.tar.bz2
am d0df44b5: am 4d71053b: Merge "attempt to fix bug 5313580" into ics-mr1
* commit 'd0df44b5c979e00a19187cea35768ba26557e447': attempt to fix bug 5313580
-rw-r--r--include/gui/SurfaceTextureClient.h1
-rw-r--r--libs/gui/SurfaceTextureClient.cpp6
2 files changed, 7 insertions, 0 deletions
diff --git a/include/gui/SurfaceTextureClient.h b/include/gui/SurfaceTextureClient.h
index 57f9e15..971a1b8 100644
--- a/include/gui/SurfaceTextureClient.h
+++ b/include/gui/SurfaceTextureClient.h
@@ -40,6 +40,7 @@ public:
protected:
SurfaceTextureClient();
+ virtual ~SurfaceTextureClient();
void setISurfaceTexture(const sp<ISurfaceTexture>& surfaceTexture);
private:
diff --git a/libs/gui/SurfaceTextureClient.cpp b/libs/gui/SurfaceTextureClient.cpp
index f66e25f..3d47f05 100644
--- a/libs/gui/SurfaceTextureClient.cpp
+++ b/libs/gui/SurfaceTextureClient.cpp
@@ -36,6 +36,12 @@ SurfaceTextureClient::SurfaceTextureClient() {
SurfaceTextureClient::init();
}
+SurfaceTextureClient::~SurfaceTextureClient() {
+ if (mConnectedToCpu) {
+ SurfaceTextureClient::disconnect(NATIVE_WINDOW_API_CPU);
+ }
+}
+
void SurfaceTextureClient::init() {
// Initialize the ANativeWindow function pointers.
ANativeWindow::setSwapInterval = hook_setSwapInterval;