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

Commit 0e898965 authored by Arun Kumar K.R's avatar Arun Kumar K.R Committed by Steve Kondik
Browse files

sf: ex-sf: Remove screenshot surface from secondary displays

- When rotation animation is disabled on secondary displays, remove
  the screenshot surface from the secondary display list, without
  this it would show up upside down frame on secondary.
- Mark IntOnly layers as invisible on secondary displays.

Change-Id: Ia859ee1c6ac7caa132c95e4f906bd2589e786fac
Crs-fixed: 949263
parent a98331d1
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -138,6 +138,18 @@ bool ExSurfaceFlinger::updateLayerVisibleNonTransparentRegion(
        layer->setVisibleNonTransparentRegion(visibleNonTransRegion);
        return true;
    }

    if (mDisableExtAnimation) {
        /* Remove screenShotSurface from secondary displays when ext animation disabled */
        const int screenShotLen = strlen("ScreenshotSurface");
        if (dpy && !strncmp(layer->getName(), "ScreenshotSurface", screenShotLen) ) {
            Region visibleNonTransRegion;
            visibleNonTransRegion.set(Rect(0, 0));
            layer->setVisibleNonTransparentRegion(visibleNonTransRegion);
            return true;
        }
    }

    return false;
}

@@ -181,6 +193,7 @@ bool ExSurfaceFlinger::canDrawLayerinScreenShot(
       && !layer->isProtected()
       && !(!dispType && (layer->isExtOnly() ||
          (isExtendedMode() && layer->isYuvLayer())))
       && !(layer->isIntOnly() && dispType)
       && layer->isVisible()){
        return true;
    }