[sf] Only trace rebuildLayerStacks if there are changes
Clean up perfetto traces to only show
tags when they are interesting.
Bug: 292225846
Test: open trace in perfetto
Change-Id: I1e3744abb08c7a3b34244db8ce8be5299cf86b19
diff --git a/services/surfaceflinger/CompositionEngine/src/Output.cpp b/services/surfaceflinger/CompositionEngine/src/Output.cpp
index 1205a2c..b1b5708 100644
--- a/services/surfaceflinger/CompositionEngine/src/Output.cpp
+++ b/services/surfaceflinger/CompositionEngine/src/Output.cpp
@@ -469,15 +469,14 @@
void Output::rebuildLayerStacks(const compositionengine::CompositionRefreshArgs& refreshArgs,
LayerFESet& layerFESet) {
- ATRACE_CALL();
- ALOGV(__FUNCTION__);
-
auto& outputState = editState();
// Do nothing if this output is not enabled or there is no need to perform this update
if (!outputState.isEnabled || CC_LIKELY(!refreshArgs.updatingOutputGeometryThisFrame)) {
return;
}
+ ATRACE_CALL();
+ ALOGV(__FUNCTION__);
// Process the layers to determine visibility and coverage
compositionengine::Output::CoverageState coverage{layerFESet};