@@ -2887,7 +2887,8 @@ CompositeResultsPerDisplay SurfaceFlinger::composite(
28872887 ui::DisplayMap<ui::LayerStack, ftl::Unit> outputLayerStacks;
28882888 auto isUniqueOutputLayerStack = [&outputLayerStacks](DisplayId id, ui::LayerStack layerStack) {
28892889 if (FlagManager::getInstance ().reject_dupe_layerstacks ()) {
2890- if (layerStack != ui::INVALID_LAYER_STACK && outputLayerStacks.contains (layerStack)) {
2890+ if (layerStack != ui::UNASSIGNED_LAYER_STACK &&
2891+ outputLayerStacks.contains (layerStack)) {
28912892 // TODO: remove log and DisplayId from params once reject_dupe_layerstacks flag is
28922893 // removed
28932894 ALOGD (" Existing layer stack ID %d output to another display %" PRIu64
@@ -3016,9 +3017,9 @@ CompositeResultsPerDisplay SurfaceFlinger::composite(
30163017 LayerFE::ReleaseFencePromiseStatus::UNINITIALIZED ||
30173018 layerFE->getReleaseFencePromiseStatus () ==
30183019 LayerFE::ReleaseFencePromiseStatus::FULFILLED) {
3019- // layerStack is invalid because layer is not on a display
3020+ // layerStack is unassigned because layer is not on a display
30203021 attachReleaseFenceFutureToLayer (layer.get (), layerFE.get (),
3021- ui::INVALID_LAYER_STACK );
3022+ ui::UNASSIGNED_LAYER_STACK );
30223023 }
30233024 }
30243025 }
@@ -3035,13 +3036,13 @@ CompositeResultsPerDisplay SurfaceFlinger::composite(
30353036
30363037 int index = 0 ;
30373038 ftl::StaticVector<char , WorkloadTracer::COMPOSITION_SUMMARY_SIZE> compositionSummary;
3038- auto lastLayerStack = ui::INVALID_LAYER_STACK ;
3039+ auto lastLayerStack = ui::UNASSIGNED_LAYER_STACK ;
30393040
30403041 uint64_t prevOverrideBufferId = 0 ;
30413042 for (auto & [layer, layerFE] : layers) {
30423043 CompositionResult compositionResult{layerFE->stealCompositionResult ()};
30433044 if (lastLayerStack != layerFE->mSnapshot ->outputFilter .layerStack ) {
3044- if (lastLayerStack != ui::INVALID_LAYER_STACK ) {
3045+ if (lastLayerStack != ui::UNASSIGNED_LAYER_STACK ) {
30453046 // add a space to separate displays
30463047 compositionSummary.push_back (' ' );
30473048 }
@@ -3356,7 +3357,7 @@ void SurfaceFlinger::onCompositionPresented(PhysicalDisplayId pacesetterId,
33563357 if (optDisplay && !optDisplay->get ()->isVirtual ()) {
33573358 auto fence = getHwComposer ().getPresentFence (optDisplay->get ()->getPhysicalId ());
33583359 layer->prepareReleaseCallbacks (ftl::yield<FenceResult>(fence),
3359- ui::INVALID_LAYER_STACK );
3360+ ui::UNASSIGNED_LAYER_STACK );
33603361 }
33613362 }
33623363 layer->releasePendingBuffer (presentTime.ns ());
@@ -6219,7 +6220,7 @@ void SurfaceFlinger::dumpHdrInfo(std::string& result) const {
62196220void SurfaceFlinger::dumpFrontEnd (std::string& result) {
62206221 std::ostringstream out;
62216222 out << " \n Composition list (bottom to top)\n " ;
6222- ui::LayerStack lastPrintedLayerStackHeader = ui::INVALID_LAYER_STACK ;
6223+ ui::LayerStack lastPrintedLayerStackHeader = ui::UNASSIGNED_LAYER_STACK ;
62236224 for (const auto & snapshot : mLayerSnapshotBuilder .getSnapshots ()) {
62246225 if (lastPrintedLayerStackHeader != snapshot->outputFilter .layerStack ) {
62256226 lastPrintedLayerStackHeader = snapshot->outputFilter .layerStack ;
@@ -6229,7 +6230,7 @@ void SurfaceFlinger::dumpFrontEnd(std::string& result) {
62296230 }
62306231
62316232 out << " \n Input list\n " ;
6232- lastPrintedLayerStackHeader = ui::INVALID_LAYER_STACK ;
6233+ lastPrintedLayerStackHeader = ui::UNASSIGNED_LAYER_STACK ;
62336234 mLayerSnapshotBuilder .forEachInputSnapshot ([&](const frontend::LayerSnapshot& snapshot) {
62346235 if (lastPrintedLayerStackHeader != snapshot.outputFilter .layerStack ) {
62356236 lastPrintedLayerStackHeader = snapshot.outputFilter .layerStack ;
@@ -6247,7 +6248,7 @@ void SurfaceFlinger::dumpFrontEnd(std::string& result) {
62476248void SurfaceFlinger::dumpVisibleFrontEnd (std::string& result) {
62486249 std::ostringstream out;
62496250 out << " \n Composition list (bottom to top)\n " ;
6250- ui::LayerStack lastPrintedLayerStackHeader = ui::INVALID_LAYER_STACK ;
6251+ ui::LayerStack lastPrintedLayerStackHeader = ui::UNASSIGNED_LAYER_STACK ;
62516252 mLayerSnapshotBuilder .forEachVisibleSnapshot (
62526253 [&](std::unique_ptr<frontend::LayerSnapshot>& snapshot) {
62536254 if (snapshot->hasSomethingToDraw ()) {
@@ -6260,7 +6261,7 @@ void SurfaceFlinger::dumpVisibleFrontEnd(std::string& result) {
62606261 });
62616262
62626263 out << " \n Input list\n " ;
6263- lastPrintedLayerStackHeader = ui::INVALID_LAYER_STACK ;
6264+ lastPrintedLayerStackHeader = ui::UNASSIGNED_LAYER_STACK ;
62646265 mLayerSnapshotBuilder .forEachInputSnapshot ([&](const frontend::LayerSnapshot& snapshot) {
62656266 if (lastPrintedLayerStackHeader != snapshot.outputFilter .layerStack ) {
62666267 lastPrintedLayerStackHeader = snapshot.outputFilter .layerStack ;
@@ -7693,7 +7694,7 @@ bool SurfaceFlinger::getSnapshotsFromMainThread(
76937694 if (mRenderEngine ->isThreaded ()) {
76947695 for (auto & [layer, layerFE] : layers) {
76957696 attachReleaseFenceFutureToLayer (layer, layerFE.get (),
7696- ui::INVALID_LAYER_STACK );
7697+ ui::UNASSIGNED_LAYER_STACK );
76977698 }
76987699 }
76997700 return getDisplayStateOnMainThread (args);
@@ -7975,7 +7976,7 @@ ftl::SharedFuture<FenceResult> SurfaceFlinger::renderScreenImpl(
79757976 // deadlocks between main thread and binder threads waiting for the future fence
79767977 // result, fences should be added to layers in the same hop onto the main thread.
79777978 if (!mRenderEngine ->isThreaded ()) {
7978- attachReleaseFenceFutureToLayer (layer, layerFE.get (), ui::INVALID_LAYER_STACK );
7979+ attachReleaseFenceFutureToLayer (layer, layerFE.get (), ui::UNASSIGNED_LAYER_STACK );
79797980 }
79807981 layerFEs.push_back (layerFE);
79817982 }
0 commit comments