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

Commit a0afe209 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
Bug: 273149531
Test: builds
Change-Id: Id4df40e869c2735ab7049eb50f07b81f56024001
Merged-In: Id4df40e869c2735ab7049eb50f07b81f56024001
parent 50be49ca
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -459,6 +459,7 @@ bool BufferStateLayer::setHdrMetadata(const HdrMetadata& hdrMetadata) {
}

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