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

Commit 2b1b429c authored by Sally Qi's avatar Sally Qi
Browse files

Skip transaction processing if the surface damage stays the same in Layer::setSurfaceDamageRegion.

Bug: 273143519
Test: builds
Change-Id: Id4df40e869c2735ab7049eb50f07b81f56024001
parent 95d9bdd8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3168,6 +3168,7 @@ bool Layer::setHdrMetadata(const HdrMetadata& hdrMetadata) {
}

bool Layer::setSurfaceDamageRegion(const Region& surfaceDamage) {
    if (mDrawingState.surfaceDamageRegion.hasSameRects(surfaceDamage)) return false;
    mDrawingState.surfaceDamageRegion = surfaceDamage;
    mDrawingState.modified = true;
    setTransactionFlags(eTransactionNeeded);