diff options
| author | 2019-03-07 20:59:59 -0800 | |
|---|---|---|
| committer | 2019-08-29 12:39:38 -0700 | |
| commit | c7b0c75f80c5cd5e1de1b7911981061bfd672f6e (patch) | |
| tree | 0da678446f4ceef8e92ba8aa9e2e0c7e913d4ac9 /services/surfaceflinger/SurfaceFlinger.cpp | |
| parent | 6a3b44698f365cb608f43df6e45844b4e18d3064 (diff) | |
SF: Move/Refactor updateCursorAsync to CompositionEngine
As part of this change, the existing LayerFE::latchCompositionState is
extended to allow for more state types to be fetched.
Test: atest libsurfaceflinger_unittest libcompositionengine_test
Bug: 121291683
Change-Id: I71e0f547440a64c1025f36741beb68e72c18e475
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 83f3b2cecd..8760bb0900 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -2715,15 +2715,14 @@ void SurfaceFlinger::executeInputWindowCommands() { void SurfaceFlinger::updateCursorAsync() { - for (const auto& [token, display] : mDisplays) { - if (!display->getId()) { - continue; - } - - for (auto& layer : display->getVisibleLayersSortedByZ()) { - layer->updateCursorPosition(display); + compositionengine::CompositionRefreshArgs refreshArgs; + for (const auto& [_, display] : mDisplays) { + if (display->getId()) { + refreshArgs.outputs.push_back(display->getCompositionDisplay()); } } + + mCompositionEngine->updateCursorAsync(refreshArgs); } void SurfaceFlinger::commitTransaction() |