Skip to content

Commit 65c005a

Browse files
chaviwLinus Tufvesson
authored andcommitted
Set windowInfo.displayId to be the layerStack
Instead of using the displayId sent from WMS, it's better to use the layerStack since it more accurately represents where the layer is presented. Previously, the only case where WMS needed to set a displayId different from layerStack was when using portal displays, which is no longer supported. This also fixes the case with cloned layers. If a cloned layer was placed on a different display than the main layer, the WindowInfo for the clone would end up having the same display as the main window since the properties were directly copied over. With this fix, the cloned layer's WindowInfo will get the correct layerStack that represents where it's actually rendered. Test: MediaProjection capture with mirror Bug: 195280234 Bug: 194480991 Change-Id: Id1794798a543260c9868ccdc1be3cdb574b73dd5 Merged-In: Id1794798a543260c9868ccdc1be3cdb574b73dd5 (cherry picked from commit 6eada62)
1 parent e86a721 commit 65c005a

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

services/surfaceflinger/Layer.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2330,10 +2330,7 @@ InputWindowInfo Layer::fillInputInfo(const sp<DisplayDevice>& display) {
23302330

23312331
InputWindowInfo info = mDrawingState.inputInfo;
23322332
info.id = sequence;
2333-
2334-
if (info.displayId == ADISPLAY_ID_NONE) {
2335-
info.displayId = getLayerStack();
2336-
}
2333+
info.displayId = getLayerStack();
23372334

23382335
// Transform that goes from "logical(rotated)" display to physical/unrotated display.
23392336
// This is for when inputflinger operates in physical display-space.

0 commit comments

Comments
 (0)