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

Commit cfa54ee6 authored by Rachel Lee's avatar Rachel Lee Committed by Android (Google) Code Review
Browse files

Merge "Add GTE compatibility enum to Surface." into main

parents f9226ec7 44b6c3fd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -53397,6 +53397,7 @@ package android.view {
    field @NonNull public static final android.os.Parcelable.Creator<android.view.Surface> CREATOR;
    field public static final int FRAME_RATE_COMPATIBILITY_DEFAULT = 0; // 0x0
    field public static final int FRAME_RATE_COMPATIBILITY_FIXED_SOURCE = 1; // 0x1
    field @FlaggedApi("com.android.graphics.surfaceflinger.flags.arr_setframerate_gte_enum") public static final int FRAME_RATE_COMPATIBILITY_GTE = 2; // 0x2
    field public static final int ROTATION_0 = 0; // 0x0
    field public static final int ROTATION_180 = 2; // 0x2
    field public static final int ROTATION_270 = 3; // 0x3
+18 −8
Original line number Diff line number Diff line
@@ -205,7 +205,8 @@ public class Surface implements Parcelable {
    /** @hide */
    @Retention(RetentionPolicy.SOURCE)
    @IntDef(prefix = {"FRAME_RATE_COMPATIBILITY_"},
            value = {FRAME_RATE_COMPATIBILITY_DEFAULT, FRAME_RATE_COMPATIBILITY_FIXED_SOURCE})
            value = {FRAME_RATE_COMPATIBILITY_DEFAULT, FRAME_RATE_COMPATIBILITY_FIXED_SOURCE,
                    FRAME_RATE_COMPATIBILITY_GTE})
    public @interface FrameRateCompatibility {}

    // From native_window.h. Keep these in sync.
@@ -214,6 +215,11 @@ public class Surface implements Parcelable {
     * system selects a frame rate other than what the app requested, the app will be able
     * to run at the system frame rate without requiring pull down. This value should be
     * used when displaying game content, UIs, and anything that isn't video.
     *
     * In Android version {@link Build.VERSION_CODES#BAKLAVA} and above, use
     * {@link FRAME_RATE_COMPATIBILITY_DEFAULT} for game content.
     * For other cases, see {@link FRAME_RATE_COMPATIBILITY_FIXED_SOURCE} and
     * {@link FRAME_RATE_COMPATIBILITY_GTE}.
     */
    public static final int FRAME_RATE_COMPATIBILITY_DEFAULT = 0;

@@ -227,6 +233,17 @@ public class Surface implements Parcelable {
     */
    public static final int FRAME_RATE_COMPATIBILITY_FIXED_SOURCE = 1;

    /**
     * The surface requests a frame rate that is greater than or equal to the specified frame rate.
     * This value should be used for UIs, animations, scrolling and fling, and anything that is not
     * a game or video.
     *
     * For video, use {@link FRAME_RATE_COMPATIBILITY_FIXED_SOURCE} instead. For game content, use
     * {@link FRAME_RATE_COMPATIBILITY_DEFAULT}.
     */
    @FlaggedApi(com.android.graphics.surfaceflinger.flags.Flags.FLAG_ARR_SETFRAMERATE_GTE_ENUM)
    public static final int FRAME_RATE_COMPATIBILITY_GTE = 2;

    /**
     * This surface belongs to an app on the High Refresh Rate Deny list, and needs the display
     * to operate at the exact frame rate.
@@ -250,13 +267,6 @@ public class Surface implements Parcelable {
     */
    public static final int FRAME_RATE_COMPATIBILITY_MIN = 102;

    // From window.h. Keep these in sync.
    /**
     * The surface requests a frame rate that is greater than or equal to {@code frameRate}.
     * @hide
     */
    public static final int FRAME_RATE_COMPATIBILITY_GTE = 103;

    /** @hide */
    @Retention(RetentionPolicy.SOURCE)
    @IntDef(prefix = {"CHANGE_FRAME_RATE_"},