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

Commit b654506f authored by Trevor Black's avatar Trevor Black Committed by Android (Google) Code Review
Browse files

Merge "Add missing formats from hardware_buffer.h to java AHB" into main

parents 38907b3a 479e937b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -18192,12 +18192,16 @@ package android.hardware {
    field public static final int D_16 = 48; // 0x30
    field public static final int D_24 = 49; // 0x31
    field public static final int D_FP32 = 51; // 0x33
    field @FlaggedApi("com.android.graphics.hwui.flags.requested_formats_v") public static final int RGBA_10101010 = 59; // 0x3b
    field public static final int RGBA_1010102 = 43; // 0x2b
    field public static final int RGBA_8888 = 1; // 0x1
    field public static final int RGBA_FP16 = 22; // 0x16
    field public static final int RGBX_8888 = 2; // 0x2
    field public static final int RGB_565 = 4; // 0x4
    field public static final int RGB_888 = 3; // 0x3
    field @FlaggedApi("com.android.graphics.hwui.flags.requested_formats_v") public static final int RG_1616_UINT = 58; // 0x3a
    field @FlaggedApi("com.android.graphics.hwui.flags.requested_formats_v") public static final int R_16_UINT = 57; // 0x39
    field @FlaggedApi("com.android.graphics.hwui.flags.requested_formats_v") public static final int R_8 = 56; // 0x38
    field public static final int S_UI8 = 53; // 0x35
    field public static final long USAGE_COMPOSER_OVERLAY = 2048L; // 0x800L
    field public static final long USAGE_CPU_READ_OFTEN = 3L; // 0x3L
+18 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.hardware;

import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.IntRange;
import android.annotation.LongDef;
@@ -65,6 +66,10 @@ public final class HardwareBuffer implements Parcelable, AutoCloseable {
            DS_FP32UI8,
            S_UI8,
            YCBCR_P010,
            R_8,
            R_16_UINT,
            RG_1616_UINT,
            RGBA_10101010,
    })
    public @interface Format {
    }
@@ -106,6 +111,18 @@ public final class HardwareBuffer implements Parcelable, AutoCloseable {
     * little-endian value, with the lower 6 bits set to zero.
     */
    public static final int YCBCR_P010    = 0x36;
    /** Format: 8 bits red */
    @FlaggedApi(com.android.graphics.hwui.flags.Flags.FLAG_REQUESTED_FORMATS_V)
    public static final int R_8           = 0x38;
    /** Format: 16 bits red */
    @FlaggedApi(com.android.graphics.hwui.flags.Flags.FLAG_REQUESTED_FORMATS_V)
    public static final int R_16_UINT     = 0x39;
    /** Format: 16 bits each red, green */
    @FlaggedApi(com.android.graphics.hwui.flags.Flags.FLAG_REQUESTED_FORMATS_V)
    public static final int RG_1616_UINT  = 0x3a;
    /** Format: 10 bits each red, green, blue, alpha */
    @FlaggedApi(com.android.graphics.hwui.flags.Flags.FLAG_REQUESTED_FORMATS_V)
    public static final int RGBA_10101010 = 0x3b;

    // Note: do not rename, this field is used by native code
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
+7 −0
Original line number Diff line number Diff line
@@ -34,3 +34,10 @@ flag {
  description: "Clip z-above surfaceviews to global clip rect"
  bug: "298621623"
}

flag {
  name: "requested_formats_v"
  namespace: "core_graphics"
  description: "Enable r_8, r_16_uint, rg_1616_uint, and rgba_10101010 in the SDK"
  bug: "292545615"
}