Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c91ce35f authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Init workload target in java FrameInfo" into main

parents 4e500854 fe048f8d
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -93,10 +93,12 @@ public final class FrameInfo {
    // Interval between two consecutive frames
    public static final int FRAME_INTERVAL = 11;

    // Workload target deadline for a frame
    public static final int WORKLOAD_TARGET = 12;

    // Must be the last one
    // This value must be in sync with `UI_THREAD_FRAME_INFO_SIZE` in FrameInfo.h
    // In calculating size, + 1 for Flags, and + 1 for WorkloadTarget from FrameInfo.h
    private static final int FRAME_INFO_SIZE = FRAME_INTERVAL + 2;
    private static final int FRAME_INFO_SIZE = WORKLOAD_TARGET + 1;

    /** checkstyle */
    public void setVsync(long intendedVsync, long usedVsync, long frameTimelineVsyncId,
@@ -108,6 +110,7 @@ public final class FrameInfo {
        frameInfo[FRAME_DEADLINE] = frameDeadline;
        frameInfo[FRAME_START_TIME] = frameStartTime;
        frameInfo[FRAME_INTERVAL] = frameInterval;
        frameInfo[WORKLOAD_TARGET] = frameDeadline - intendedVsync;
    }

    /** checkstyle */