diff options
| author | 2018-01-07 10:23:24 -0800 | |
|---|---|---|
| committer | 2018-08-22 13:43:14 -0700 | |
| commit | 15fb96e63f2de336bb01e0824cc85141e5edfdea (patch) | |
| tree | 2dc11d32d6ae0a7dff9e85c1301f226915e8b6ba /services/surfaceflinger/SurfaceFlinger.cpp | |
| parent | 8ed0c6f0ed9e9aa583ba077062fc119a3d386b1e (diff) | |
SF: Track compositionType across displayId's
Make sure that compositionType tracks displayId's
Bug: 112259502
Test: cts -m CtsViewTestCases
SurfaceFlinger_test
vrflinger_test
Change-Id: I748ef1a6da8257e780daf89af06d76f29d19ad6f
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
| -rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index c0c684a502..8cee8d7801 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -1464,8 +1464,11 @@ void SurfaceFlinger::handleMessageRefresh() { mVsyncModulator.onRefreshed(mHadClientComposition); mLayersWithQueuedFrames.clear(); - for (auto& compositionInfo : getBE().mCompositionInfo) { - compositionInfo.hwc.hwcLayer = nullptr; + for (const auto& [token, display] : mDisplays) { + const auto displayId = display->getId(); + for (auto& compositionInfo : getBE().mCompositionInfo[displayId]) { + compositionInfo.hwc.hwcLayer = nullptr; + } } } @@ -1551,16 +1554,18 @@ void SurfaceFlinger::calculateWorkingSet() { } mDrawingState.colorMatrixChanged = false; - getBE().mCompositionInfo.clear(); for (const auto& [token, display] : mDisplays) { + const auto displayId = display->getId(); + getBE().mCompositionInfo[displayId].clear(); for (auto& layer : display->getVisibleLayersSortedByZ()) { auto displayId = display->getId(); layer->getBE().compositionInfo.compositionType = layer->getCompositionType(displayId); if (!layer->setHwcLayer(displayId)) { ALOGV("Need to create HWCLayer for %s", layer->getName().string()); } - getBE().mCompositionInfo.push_back(layer->getBE().compositionInfo); + layer->getBE().compositionInfo.hwc.displayId = displayId; + getBE().mCompositionInfo[displayId].push_back(layer->getBE().compositionInfo); layer->getBE().compositionInfo.hwc.hwcLayer = nullptr; } } |