diff options
author | Mathias Agopian <mathias@google.com> | 2011-08-25 17:03:30 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2011-08-25 17:03:30 -0700 |
commit | 70e3f81d0fbc92394928c44fb0137787a8595665 (patch) | |
tree | e775852128de74701fe30e8794f98e942f73f3ab /libs/gui/SurfaceTextureClient.cpp | |
parent | b0610335d745718f5ee54f15ef1a492921d759f4 (diff) | |
download | frameworks_native-70e3f81d0fbc92394928c44fb0137787a8595665.zip frameworks_native-70e3f81d0fbc92394928c44fb0137787a8595665.tar.gz frameworks_native-70e3f81d0fbc92394928c44fb0137787a8595665.tar.bz2 |
make sure to re-initialize SurfaceTexture to its default state on disconnect
this caused problems where the NavigationBar would disapear or be
drawn in the wrong orientation.
Change-Id: I083c41338db83a4afd14f427caec2f31c180d734
Diffstat (limited to 'libs/gui/SurfaceTextureClient.cpp')
-rw-r--r-- | libs/gui/SurfaceTextureClient.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libs/gui/SurfaceTextureClient.cpp b/libs/gui/SurfaceTextureClient.cpp index 5a35b4d..710ef94 100644 --- a/libs/gui/SurfaceTextureClient.cpp +++ b/libs/gui/SurfaceTextureClient.cpp @@ -407,8 +407,15 @@ int SurfaceTextureClient::disconnect(int api) { LOGV("SurfaceTextureClient::disconnect"); Mutex::Autolock lock(mMutex); int err = mSurfaceTexture->disconnect(api); - if (!err && api == NATIVE_WINDOW_API_CPU) { - mConnectedToCpu = false; + if (!err) { + freeAllBuffers(); + mReqFormat = 0; + mReqWidth = 0; + mReqHeight = 0; + mReqUsage = 0; + if (api == NATIVE_WINDOW_API_CPU) { + mConnectedToCpu = false; + } } return err; } |