Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5430db0 authored by Mathias Agopian's avatar Mathias Agopian
Browse files

fix [2269582] [TOP-10][Passion_1506][APT:Camera]Sometimes camera preview...

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.
parent f414887b
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -93,6 +93,7 @@ sp<LayerBaseClient::Surface> Layer::createSurface() const
status_t Layer::ditch()
status_t Layer::ditch()
{
{
    // the layer is not on screen anymore. free as much resources as possible
    // the layer is not on screen anymore. free as much resources as possible
    mFreezeLock.clear();
    destroy();
    destroy();
    return NO_ERROR;
    return NO_ERROR;
}
}