@@ -2867,7 +2867,8 @@ CompositeResultsPerDisplay SurfaceFlinger::composite(
28672867 ui::DisplayMap<ui::LayerStack, ftl::Unit> outputLayerStacks;
28682868 auto isUniqueOutputLayerStack = [&outputLayerStacks](DisplayId id, ui::LayerStack layerStack) {
28692869 if (FlagManager::getInstance ().reject_dupe_layerstacks ()) {
2870- if (layerStack != ui::INVALID_LAYER_STACK && outputLayerStacks.contains (layerStack)) {
2870+ if (layerStack != ui::UNASSIGNED_LAYER_STACK &&
2871+ outputLayerStacks.contains (layerStack)) {
28712872 // TODO: remove log and DisplayId from params once reject_dupe_layerstacks flag is
28722873 // removed
28732874 ALOGD (" Existing layer stack ID %d output to another display %" PRIu64
@@ -2996,9 +2997,9 @@ CompositeResultsPerDisplay SurfaceFlinger::composite(
29962997 LayerFE::ReleaseFencePromiseStatus::UNINITIALIZED ||
29972998 layerFE->getReleaseFencePromiseStatus () ==
29982999 LayerFE::ReleaseFencePromiseStatus::FULFILLED) {
2999- // layerStack is invalid because layer is not on a display
3000+ // layerStack is unassigned because layer is not on a display
30003001 attachReleaseFenceFutureToLayer (layer.get (), layerFE.get (),
3001- ui::INVALID_LAYER_STACK );
3002+ ui::UNASSIGNED_LAYER_STACK );
30023003 }
30033004 }
30043005 }
@@ -3015,13 +3016,13 @@ CompositeResultsPerDisplay SurfaceFlinger::composite(
30153016
30163017 int index = 0 ;
30173018 ftl::StaticVector<char , WorkloadTracer::COMPOSITION_SUMMARY_SIZE> compositionSummary;
3018- auto lastLayerStack = ui::INVALID_LAYER_STACK ;
3019+ auto lastLayerStack = ui::UNASSIGNED_LAYER_STACK ;
30193020
30203021 uint64_t prevOverrideBufferId = 0 ;
30213022 for (auto & [layer, layerFE] : layers) {
30223023 CompositionResult compositionResult{layerFE->stealCompositionResult ()};
30233024 if (lastLayerStack != layerFE->mSnapshot ->outputFilter .layerStack ) {
3024- if (lastLayerStack != ui::INVALID_LAYER_STACK ) {
3025+ if (lastLayerStack != ui::UNASSIGNED_LAYER_STACK ) {
30253026 // add a space to separate displays
30263027 compositionSummary.push_back (' ' );
30273028 }
@@ -3346,7 +3347,7 @@ void SurfaceFlinger::onCompositionPresented(PhysicalDisplayId pacesetterId,
33463347 if (optDisplay && !optDisplay->get ()->isVirtual ()) {
33473348 auto fence = getHwComposer ().getPresentFence (optDisplay->get ()->getPhysicalId ());
33483349 layer->prepareReleaseCallbacks (ftl::yield<FenceResult>(fence),
3349- ui::INVALID_LAYER_STACK );
3350+ ui::UNASSIGNED_LAYER_STACK );
33503351 }
33513352 }
33523353 layer->releasePendingBuffer (presentTime.ns ());
@@ -6182,7 +6183,7 @@ void SurfaceFlinger::dumpHdrInfo(std::string& result) const {
61826183void SurfaceFlinger::dumpFrontEnd (std::string& result) {
61836184 std::ostringstream out;
61846185 out << " \n Composition list (bottom to top)\n " ;
6185- ui::LayerStack lastPrintedLayerStackHeader = ui::INVALID_LAYER_STACK ;
6186+ ui::LayerStack lastPrintedLayerStackHeader = ui::UNASSIGNED_LAYER_STACK ;
61866187 for (const auto & snapshot : mLayerSnapshotBuilder .getSnapshots ()) {
61876188 if (lastPrintedLayerStackHeader != snapshot->outputFilter .layerStack ) {
61886189 lastPrintedLayerStackHeader = snapshot->outputFilter .layerStack ;
@@ -6192,7 +6193,7 @@ void SurfaceFlinger::dumpFrontEnd(std::string& result) {
61926193 }
61936194
61946195 out << " \n Input list\n " ;
6195- lastPrintedLayerStackHeader = ui::INVALID_LAYER_STACK ;
6196+ lastPrintedLayerStackHeader = ui::UNASSIGNED_LAYER_STACK ;
61966197 mLayerSnapshotBuilder .forEachInputSnapshot ([&](const frontend::LayerSnapshot& snapshot) {
61976198 if (lastPrintedLayerStackHeader != snapshot.outputFilter .layerStack ) {
61986199 lastPrintedLayerStackHeader = snapshot.outputFilter .layerStack ;
@@ -6210,7 +6211,7 @@ void SurfaceFlinger::dumpFrontEnd(std::string& result) {
62106211void SurfaceFlinger::dumpVisibleFrontEnd (std::string& result) {
62116212 std::ostringstream out;
62126213 out << " \n Composition list (bottom to top)\n " ;
6213- ui::LayerStack lastPrintedLayerStackHeader = ui::INVALID_LAYER_STACK ;
6214+ ui::LayerStack lastPrintedLayerStackHeader = ui::UNASSIGNED_LAYER_STACK ;
62146215 mLayerSnapshotBuilder .forEachVisibleSnapshot (
62156216 [&](std::unique_ptr<frontend::LayerSnapshot>& snapshot) {
62166217 if (snapshot->hasSomethingToDraw ()) {
@@ -6223,7 +6224,7 @@ void SurfaceFlinger::dumpVisibleFrontEnd(std::string& result) {
62236224 });
62246225
62256226 out << " \n Input list\n " ;
6226- lastPrintedLayerStackHeader = ui::INVALID_LAYER_STACK ;
6227+ lastPrintedLayerStackHeader = ui::UNASSIGNED_LAYER_STACK ;
62276228 mLayerSnapshotBuilder .forEachInputSnapshot ([&](const frontend::LayerSnapshot& snapshot) {
62286229 if (lastPrintedLayerStackHeader != snapshot.outputFilter .layerStack ) {
62296230 lastPrintedLayerStackHeader = snapshot.outputFilter .layerStack ;
@@ -7683,7 +7684,7 @@ bool SurfaceFlinger::getSnapshotsFromMainThread(
76837684 if (mRenderEngine ->isThreaded ()) {
76847685 for (auto & [layer, layerFE] : layers) {
76857686 attachReleaseFenceFutureToLayer (layer, layerFE.get (),
7686- ui::INVALID_LAYER_STACK );
7687+ ui::UNASSIGNED_LAYER_STACK );
76877688 }
76887689 }
76897690 return getDisplayStateOnMainThread (args);
@@ -7965,7 +7966,7 @@ ftl::SharedFuture<FenceResult> SurfaceFlinger::renderScreenImpl(
79657966 // deadlocks between main thread and binder threads waiting for the future fence
79667967 // result, fences should be added to layers in the same hop onto the main thread.
79677968 if (!mRenderEngine ->isThreaded ()) {
7968- attachReleaseFenceFutureToLayer (layer, layerFE.get (), ui::INVALID_LAYER_STACK );
7969+ attachReleaseFenceFutureToLayer (layer, layerFE.get (), ui::UNASSIGNED_LAYER_STACK );
79697970 }
79707971 layerFEs.push_back (layerFE);
79717972 }
0 commit comments