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
This commit is contained in:
Arun Kumar K.R 2015-12-17 13:36:49 -08:00 committed by Steve Kondik
parent a98331d1ae
commit 0e898965c3

View File

@ -138,6 +138,18 @@ bool ExSurfaceFlinger::updateLayerVisibleNonTransparentRegion(
layer->setVisibleNonTransparentRegion(visibleNonTransRegion); layer->setVisibleNonTransparentRegion(visibleNonTransRegion);
return true; 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; return false;
} }
@ -181,6 +193,7 @@ bool ExSurfaceFlinger::canDrawLayerinScreenShot(
&& !layer->isProtected() && !layer->isProtected()
&& !(!dispType && (layer->isExtOnly() || && !(!dispType && (layer->isExtOnly() ||
(isExtendedMode() && layer->isYuvLayer()))) (isExtendedMode() && layer->isYuvLayer())))
&& !(layer->isIntOnly() && dispType)
&& layer->isVisible()){ && layer->isVisible()){
return true; return true;
} }