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
This commit is contained in:
Jeff Brown 2012-08-15 01:08:54 -07:00
parent ea599dfff0
commit 01eb979243
1 changed files with 2 additions and 2 deletions

View File

@ -1406,7 +1406,7 @@ status_t SurfaceFlinger::removeLayer(const sp<LayerBase>& 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>& client, SurfaceID sid)
if (layer != 0) {
err = purgatorizeLayer_l(layer);
if (err == NO_ERROR) {
setTransactionFlags(eTransactionNeeded);
setTransactionFlags(eDisplayTransactionNeeded);
}
}
return err;