summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Kumar K.R <akumarkr@codeaurora.org>2015-12-17 13:36:49 -0800
committerSteve Kondik <steve@cyngn.com>2016-03-11 16:52:02 -0800
commit0e898965c31abd6a861c0af3223f0759b1a4ef6d (patch)
tree8b2324dd3d138f28af30ce7b82388076dcbfd546
parenta98331d1ae08eb57a4829674ce05f50de80c169c (diff)
downloadframeworks_native-0e898965c31abd6a861c0af3223f0759b1a4ef6d.zip
frameworks_native-0e898965c31abd6a861c0af3223f0759b1a4ef6d.tar.gz
frameworks_native-0e898965c31abd6a861c0af3223f0759b1a4ef6d.tar.bz2
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
-rw-r--r--services/surfaceflinger/ExSurfaceFlinger/ExSurfaceFlinger.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/services/surfaceflinger/ExSurfaceFlinger/ExSurfaceFlinger.cpp b/services/surfaceflinger/ExSurfaceFlinger/ExSurfaceFlinger.cpp
index 3579abb..0014e80 100644
--- a/services/surfaceflinger/ExSurfaceFlinger/ExSurfaceFlinger.cpp
+++ b/services/surfaceflinger/ExSurfaceFlinger/ExSurfaceFlinger.cpp
@@ -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;