Merge "Correct JankData.PREDICTION_ERROR meaning"

This commit is contained in:
Ady Abraham
2022-02-17 02:12:43 +00:00
committed by Android (Google) Code Review
2 changed files with 4 additions and 6 deletions

View File

@@ -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;

View File

@@ -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;