Ensure eLayerSkipScreenshot doesn't hide layers on external displays
eLayerSkipScreenshot is enforced through separate paths for screen recording and screen capture. Prior to this change, for screen recording, LayerSnapshotBuilder hid mirrored LayerSnapshots when eLayerSkipScreenshot was set. For screen capture, CompositionEngine enforced the flag via LayerFilter::toInternalDisplay, filtering out any layers with eLayerSkipScreenshot when not presenting to an internal display. The second mechanism caused an issue when using connected displays. Connected displays aren't internal so eLayerSkipScreenshot layers were hidden, despite the display not being used for screen recording or capture. To fix this issue, the CompositionEngine mechanism is updated to use a new field, LayerFilter::skipScreenshot. For Outputs, LayerFilter::skipScreenshot is true only for ScreenCaptureOutputs. For Layers, LayerFilter::skipScreenshot is true if the layer sets eLayerSkipScreenshot. This change fixes the issue where eLayerSkipScreenshot layers are hidden on connected displays but breaks screen recording scenarios where a layer is being recorded instead of an entire display because CompositionEngine will no longer filter out eLayerSkipScreenshot on virtual displays. To fix screen recording, the LayerSnapshotBuilder mechanism is extended to enforce the flag whenever layer mirroring is used (as opposed to only enforcing it for display mirroring). Bug: 418143858 Flag: com.android.input.flags.connected_displays_cursor Test: composition engine tests, SF frontend unit tests, manual verification Change-Id: I311b38682b03896648a21d2291ccc4cc7a239bbe
Loading
Please register or sign in to comment