diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java index c08177e2f71ed..98cef95885bdb 100644 --- a/core/java/android/view/SurfaceControl.java +++ b/core/java/android/view/SurfaceControl.java @@ -389,9 +389,7 @@ public final class SurfaceControl implements Parcelable { public static final int JANK_SURFACEFLINGER_GPU_DEADLINE_MISSED = 0x4; // Either App or GPU took too long on the frame public static final int JANK_APP_DEADLINE_MISSED = 0x8; - // Predictions live for 120ms, if prediction is expired for a frame, there is definitely a - // jank - // associated with the App if this is for a SurfaceFrame, and SF for a DisplayFrame. + // Vsync predictions have drifted beyond the threshold from the actual HWVsync public static final int PREDICTION_ERROR = 0x10; // Latching a buffer early might cause an early present of the frame public static final int SURFACE_FLINGER_SCHEDULING = 0x20; diff --git a/core/java/com/android/internal/jank/FrameTracker.java b/core/java/com/android/internal/jank/FrameTracker.java index e1a67d861bcb9..9eea8a5d06e4c 100644 --- a/core/java/com/android/internal/jank/FrameTracker.java +++ b/core/java/com/android/internal/jank/FrameTracker.java @@ -464,8 +464,7 @@ public class FrameTracker extends SurfaceControl.OnJankDataListener if (info.surfaceControlCallbackFired) { totalFramesCount++; boolean missedFrame = false; - if ((info.jankType & PREDICTION_ERROR) != 0 - || ((info.jankType & JANK_APP_DEADLINE_MISSED) != 0)) { + if ((info.jankType & JANK_APP_DEADLINE_MISSED) != 0) { Log.w(TAG, "Missed App frame:" + info.jankType); missedAppFramesCount++; missedFrame = true; @@ -473,7 +472,8 @@ public class FrameTracker extends SurfaceControl.OnJankDataListener if ((info.jankType & DISPLAY_HAL) != 0 || (info.jankType & JANK_SURFACEFLINGER_DEADLINE_MISSED) != 0 || (info.jankType & JANK_SURFACEFLINGER_GPU_DEADLINE_MISSED) != 0 - || (info.jankType & SURFACE_FLINGER_SCHEDULING) != 0) { + || (info.jankType & SURFACE_FLINGER_SCHEDULING) != 0 + || (info.jankType & PREDICTION_ERROR) != 0) { Log.w(TAG, "Missed SF frame:" + info.jankType); missedSfFramesCount++; missedFrame = true;