Allow AppDeadlineMissed along with DisplayFrame jank for SurfaceFrames
If a DisplayFrame is janky, there is nothing the app could have done to
mitigate it. However, sweeping the app jank under the rug here prevents
the app metrics to recognize a genuine late frame from the app.
Bug: 183127139
Test: libsurfaceflinger_unittest
Change-Id: I62984f6cc8601fbf8bfb56d2e5f823c4f79f934b
diff --git a/services/surfaceflinger/FrameTimeline/FrameTimeline.cpp b/services/surfaceflinger/FrameTimeline/FrameTimeline.cpp
index 2784861..6485265 100644
--- a/services/surfaceflinger/FrameTimeline/FrameTimeline.cpp
+++ b/services/surfaceflinger/FrameTimeline/FrameTimeline.cpp
@@ -575,13 +575,9 @@
}
} else if (mFrameReadyMetadata == FrameReadyMetadata::LateFinish) {
// Finish late, Present late
- if (displayFrameJankType == JankType::None) {
- // Display frame is not janky, so purely app's fault
- mJankType |= JankType::AppDeadlineMissed;
- } else {
- // Propagate DisplayFrame's jankType if it is janky
- mJankType |= displayFrameJankType;
- }
+ mJankType |= JankType::AppDeadlineMissed;
+ // Propagate DisplayFrame's jankType if it is janky
+ mJankType |= displayFrameJankType;
}
}
}