From 2239b3749806e0e967fc6bd144b073d613de339f Mon Sep 17 00:00:00 2001 From: Evan Rosky Date: Thu, 20 May 2021 13:43:47 -0700 Subject: Inform SurfaceFlinger about displays which receive input Right now, multiple display devices can share a layerstack. This means that when constructing InputWindowInfo, its impossible to know which display transform matches the display viewport that inputflinger dispatches against. To remedy this, have displaymanager inform surfaceflinger which displays "receiveInput" using the same logic that controls which display viewport it sends to inputflinger. Bug: 179274888 Test: atest SetDisplayStateLockedTest Change-Id: If0ffb1b5405f7e7dcdf8ea2f12c109d661a540fe --- libs/gui/SurfaceComposerClient.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libs/gui/SurfaceComposerClient.cpp') diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp index aa938087e8..25d9b2b5c9 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -1730,6 +1730,12 @@ void SurfaceComposerClient::Transaction::setDisplayLayerStack(const sp& s.what |= DisplayState::eLayerStackChanged; } +void SurfaceComposerClient::Transaction::setDisplayFlags(const sp& token, uint32_t flags) { + DisplayState& s(getDisplayState(token)); + s.flags = flags; + s.what |= DisplayState::eFlagsChanged; +} + void SurfaceComposerClient::Transaction::setDisplayProjection(const sp& token, ui::Rotation orientation, const Rect& layerStackRect, -- cgit v1.2.3-59-g8ed1b