SF: Support display mirroring with new frontend
Bug: 238781169
Test: presubmit
Change-Id: I569822bd1dd70e2b0b660042329abb27f263dc66
diff --git a/services/surfaceflinger/FrontEnd/LayerSnapshot.cpp b/services/surfaceflinger/FrontEnd/LayerSnapshot.cpp
index 3a0540c..4e69565 100644
--- a/services/surfaceflinger/FrontEnd/LayerSnapshot.cpp
+++ b/services/surfaceflinger/FrontEnd/LayerSnapshot.cpp
@@ -112,6 +112,10 @@
}
bool LayerSnapshot::getIsVisible() const {
+ if (handleSkipScreenshotFlag & outputFilter.toInternalDisplay) {
+ return false;
+ }
+
if (!hasSomethingToDraw()) {
return false;
}
@@ -125,6 +129,7 @@
std::string LayerSnapshot::getIsVisibleReason() const {
// not visible
+ if (handleSkipScreenshotFlag & outputFilter.toInternalDisplay) return "eLayerSkipScreenshot";
if (!hasSomethingToDraw()) return "!hasSomethingToDraw";
if (invalidTransform) return "invalidTransform";
if (isHiddenByPolicyFromParent) return "hidden by parent or layer flag";