summaryrefslogtreecommitdiffstats
path: root/libs/surfaceflinger
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-12-11 00:56:10 -0800
committerMathias Agopian <mathias@google.com>2009-12-11 00:56:10 -0800
commitf5430db059be3e771c004d0ada594bf8820d0517 (patch)
treee291c558ae63d711f9570038ce2dd78ccdef3874 /libs/surfaceflinger
parentf414887b3c7af00a66c7f8b105dfd9fd2cb3ec2f (diff)
downloadframeworks_native-f5430db059be3e771c004d0ada594bf8820d0517.zip
frameworks_native-f5430db059be3e771c004d0ada594bf8820d0517.tar.gz
frameworks_native-f5430db059be3e771c004d0ada594bf8820d0517.tar.bz2
fix [2269582] [TOP-10][Passion_1506][APT:Camera]Sometimes camera preview screen is truncated after launching and back to home screen by home key repeatedly
When a surface is removed from the screen while it holds a "freeze lock", the release of that lock happens in the destructor as a "safety net". However, it doesn't trigger an update at that point. Make sure that "freeze locks" are released from the transaction at the point a surface is removed from the screen (if it's not on screen, it shouldn't prevent the screen to redraw, and therefore cannot hold a freeze lock). The refresh corresponding to that transaction will pick it up as soon as possible.
Diffstat (limited to 'libs/surfaceflinger')
-rw-r--r--libs/surfaceflinger/Layer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/surfaceflinger/Layer.cpp b/libs/surfaceflinger/Layer.cpp
index b12c749..1870d3a 100644
--- a/libs/surfaceflinger/Layer.cpp
+++ b/libs/surfaceflinger/Layer.cpp
@@ -93,6 +93,7 @@ sp<LayerBaseClient::Surface> Layer::createSurface() const
status_t Layer::ditch()
{
// the layer is not on screen anymore. free as much resources as possible
+ mFreezeLock.clear();
destroy();
return NO_ERROR;
}