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
1 changed files with 14 additions and 1 deletions

View File

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