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

Commit 3bcb0a8f authored by Wenhui Yang's avatar Wenhui Yang
Browse files

Revert the change of unifying visibility

Fixes: 305254099
Flag: com.android.graphics.surfaceflinger.flags.skip_invisible_windows_in_input
Test: libgui_test.InputSurfacesTest
Change-Id: Ibadb7f9c60438474c3f7c15a17ee3ad0d8c61ac0
parent 9cab74cf
Loading
Loading
Loading
Loading
+15 −22
Original line number Diff line number Diff line
@@ -264,12 +264,6 @@ void updateVisibility(LayerSnapshot& snapshot, bool visible) {
    }
    snapshot.isVisible = visible;

    if (FlagManager::getInstance().skip_invisible_windows_in_input()) {
        const bool visibleForInput =
                snapshot.isVisible || (snapshot.hasInputInfo() && !snapshot.isHiddenByPolicy());
        snapshot.inputInfo.setInputConfig(gui::WindowInfo::InputConfig::NOT_VISIBLE,
                                          !visibleForInput);
    } else {
    // TODO(b/238781169) we are ignoring this compat for now, since we will have
    // to remove any optimization based on visibility.

@@ -283,9 +277,8 @@ void updateVisibility(LayerSnapshot& snapshot, bool visible) {
    // anything.
    const bool visibleForInput =
            snapshot.hasInputInfo() ? snapshot.canReceiveInput() : snapshot.isVisible;
        snapshot.inputInfo.setInputConfig(gui::WindowInfo::InputConfig::NOT_VISIBLE,
                                          !visibleForInput);
    }
    snapshot.inputInfo.setInputConfig(gui::WindowInfo::InputConfig::NOT_VISIBLE, !visibleForInput);

    LLOGV(snapshot.sequence, "updating visibility %s %s", visible ? "true" : "false",
          snapshot.getDebugString().c_str());
}