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

Commit 3beb7117 authored by Fabien Sanglard's avatar Fabien Sanglard
Browse files

Refactor SurfaceFlinger::rebuildLayerStacks

Reduce indentation with early return

Change-Id: Ic3a16bf45a0c1792b0fcbd5d9d1cd9f1e239ae32
parent b0254c42
Loading
Loading
Loading
Loading
+39 −36
Original line number Original line Diff line number Diff line
@@ -1549,8 +1549,11 @@ void SurfaceFlinger::rebuildLayerStacks() {
    ALOGV("rebuildLayerStacks");
    ALOGV("rebuildLayerStacks");


    // rebuild the visible layer list per screen
    // rebuild the visible layer list per screen
    if (CC_UNLIKELY(mVisibleRegionsDirty)) {
    if (CC_LIKELY(mVisibleRegionsDirty)) {
        ATRACE_CALL();
        return;
    }

    ATRACE_NAME("rebuildLayerStacks VR Dirty");
    mVisibleRegionsDirty = false;
    mVisibleRegionsDirty = false;
    invalidateHwcGeometry();
    invalidateHwcGeometry();


@@ -1588,7 +1591,7 @@ void SurfaceFlinger::rebuildLayerStacks() {
                tr.transform(opaqueRegion));
                tr.transform(opaqueRegion));
        displayDevice->dirtyRegion.orSelf(dirtyRegion);
        displayDevice->dirtyRegion.orSelf(dirtyRegion);
    }
    }
    }

}
}


void SurfaceFlinger::setUpHWComposer() {
void SurfaceFlinger::setUpHWComposer() {