From 01eb979243a57bd33f8389aeeade8024dd0258c0 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Wed, 15 Aug 2012 01:08:54 -0700 Subject: [PATCH] Fix layer removal transaction. Layers were not properly being removed because we were setting the wrong transaction type flag at the time of removal. When layers are removed, we must use eDisplayTransactionNeeded, not eTransactionNeeded, to ensure that the mLayersRemoved flag is checked and the appropriate cleanup occurs. Bug: 6970310 Change-Id: Id4b2897a34d4ac00aa0f92349c0ec6db95c1aaf7 --- services/surfaceflinger/SurfaceFlinger.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 3a802ff80..97b02ce60 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1406,7 +1406,7 @@ status_t SurfaceFlinger::removeLayer(const sp& layer) Mutex::Autolock _l(mStateLock); status_t err = purgatorizeLayer_l(layer); if (err == NO_ERROR) - setTransactionFlags(eTransactionNeeded); + setTransactionFlags(eDisplayTransactionNeeded); return err; } @@ -1712,7 +1712,7 @@ status_t SurfaceFlinger::onLayerRemoved(const sp& client, SurfaceID sid) if (layer != 0) { err = purgatorizeLayer_l(layer); if (err == NO_ERROR) { - setTransactionFlags(eTransactionNeeded); + setTransactionFlags(eDisplayTransactionNeeded); } } return err;