@@ -264,28 +264,21 @@ void updateVisibility(LayerSnapshot& snapshot, bool visible) {
264264 }
265265 snapshot.isVisible = visible;
266266
267- if (FlagManager::getInstance ().skip_invisible_windows_in_input ()) {
268- const bool visibleForInput =
269- snapshot.isVisible || (snapshot.hasInputInfo () && !snapshot.isHiddenByPolicy ());
270- snapshot.inputInfo .setInputConfig (gui::WindowInfo::InputConfig::NOT_VISIBLE,
271- !visibleForInput);
272- } else {
273- // TODO(b/238781169) we are ignoring this compat for now, since we will have
274- // to remove any optimization based on visibility.
275-
276- // For compatibility reasons we let layers which can receive input
277- // receive input before they have actually submitted a buffer. Because
278- // of this we use canReceiveInput instead of isVisible to check the
279- // policy-visibility, ignoring the buffer state. However for layers with
280- // hasInputInfo()==false we can use the real visibility state.
281- // We are just using these layers for occlusion detection in
282- // InputDispatcher, and obviously if they aren't visible they can't occlude
283- // anything.
284- const bool visibleForInput =
285- snapshot.hasInputInfo () ? snapshot.canReceiveInput () : snapshot.isVisible ;
286- snapshot.inputInfo .setInputConfig (gui::WindowInfo::InputConfig::NOT_VISIBLE,
287- !visibleForInput);
288- }
267+ // TODO(b/238781169) we are ignoring this compat for now, since we will have
268+ // to remove any optimization based on visibility.
269+
270+ // For compatibility reasons we let layers which can receive input
271+ // receive input before they have actually submitted a buffer. Because
272+ // of this we use canReceiveInput instead of isVisible to check the
273+ // policy-visibility, ignoring the buffer state. However for layers with
274+ // hasInputInfo()==false we can use the real visibility state.
275+ // We are just using these layers for occlusion detection in
276+ // InputDispatcher, and obviously if they aren't visible they can't occlude
277+ // anything.
278+ const bool visibleForInput =
279+ snapshot.hasInputInfo () ? snapshot.canReceiveInput () : snapshot.isVisible ;
280+ snapshot.inputInfo .setInputConfig (gui::WindowInfo::InputConfig::NOT_VISIBLE, !visibleForInput);
281+
289282 LLOGV (snapshot.sequence , " updating visibility %s %s" , visible ? " true" : " false" ,
290283 snapshot.getDebugString ().c_str ());
291284}
0 commit comments