Loading core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -19231,6 +19231,7 @@ package android.hardware { method public boolean isClosed(); method public static boolean isSupported(@IntRange(from=1) int, @IntRange(from=1) int, int, @IntRange(from=1) int, long); method public void writeToParcel(android.os.Parcel, int); field @FlaggedApi("com.android.graphics.hwui.flags.requested_formats_bgra_1010102") public static final int BGRA_1010102 = 67; // 0x43 field public static final int BLOB = 33; // 0x21 field @NonNull public static final android.os.Parcelable.Creator<android.hardware.HardwareBuffer> CREATOR; field public static final int DS_24UI8 = 50; // 0x32 core/java/android/hardware/HardwareBuffer.java +13 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ public final class HardwareBuffer implements Parcelable, AutoCloseable { RG_1414, RGBA_12121212, RGBA_14141414, BGRA_1010102, }) public @interface Format { } Loading Loading @@ -207,6 +208,18 @@ public final class HardwareBuffer implements Parcelable, AutoCloseable { @FlaggedApi(com.android.graphics.hwui.flags.Flags.FLAG_REQUESTED_FORMATS_12_14) public static final int RGBA_14141414 = 0x42; /** * 32-bit packed format that has 2-bit A, 10-bit R, G, and B components, * in that order, from the most-significant bits to the least-significant * bits. * * The component values are unsigned normalized to the range [0, 1], whose * interpretation is defined by the dataspace. */ @FlaggedApi(com.android.graphics.hwui.flags.Flags.FLAG_REQUESTED_FORMATS_BGRA_1010102) public static final int BGRA_1010102 = 0x43; // Note: do not rename, this field is used by native code @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) private long mNativeObject; Loading libs/hwui/aconfig/hwui_flags.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -97,6 +97,14 @@ flag { bug: "390471495" } flag { name: "requested_formats_bgra_1010102" is_exported: true namespace: "core_graphics" description: "Enable BGRA_1010102 in the SDK" bug: "414794424" } flag { name: "draw_region" namespace: "core_graphics" Loading libs/hwui/utils/Color.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <cmath> #include "SkColorSpace.h" #include "SkColorType.h" namespace android { namespace uirenderer { Loading Loading @@ -68,6 +69,10 @@ static inline SkImageInfo createImageInfo(int32_t width, int32_t height, int32_t colorType = kBGRA_8888_SkColorType; alphaType = kPremul_SkAlphaType; break; case AHARDWAREBUFFER_FORMAT_B10G10R10A2_UNORM: colorType = kBGRA_1010102_SkColorType; alphaType = kPremul_SkAlphaType; break; default: ALOGV("Unsupported format: %d, return unknown by default", format); break; Loading Loading
core/api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -19231,6 +19231,7 @@ package android.hardware { method public boolean isClosed(); method public static boolean isSupported(@IntRange(from=1) int, @IntRange(from=1) int, int, @IntRange(from=1) int, long); method public void writeToParcel(android.os.Parcel, int); field @FlaggedApi("com.android.graphics.hwui.flags.requested_formats_bgra_1010102") public static final int BGRA_1010102 = 67; // 0x43 field public static final int BLOB = 33; // 0x21 field @NonNull public static final android.os.Parcelable.Creator<android.hardware.HardwareBuffer> CREATOR; field public static final int DS_24UI8 = 50; // 0x32
core/java/android/hardware/HardwareBuffer.java +13 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ public final class HardwareBuffer implements Parcelable, AutoCloseable { RG_1414, RGBA_12121212, RGBA_14141414, BGRA_1010102, }) public @interface Format { } Loading Loading @@ -207,6 +208,18 @@ public final class HardwareBuffer implements Parcelable, AutoCloseable { @FlaggedApi(com.android.graphics.hwui.flags.Flags.FLAG_REQUESTED_FORMATS_12_14) public static final int RGBA_14141414 = 0x42; /** * 32-bit packed format that has 2-bit A, 10-bit R, G, and B components, * in that order, from the most-significant bits to the least-significant * bits. * * The component values are unsigned normalized to the range [0, 1], whose * interpretation is defined by the dataspace. */ @FlaggedApi(com.android.graphics.hwui.flags.Flags.FLAG_REQUESTED_FORMATS_BGRA_1010102) public static final int BGRA_1010102 = 0x43; // Note: do not rename, this field is used by native code @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) private long mNativeObject; Loading
libs/hwui/aconfig/hwui_flags.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -97,6 +97,14 @@ flag { bug: "390471495" } flag { name: "requested_formats_bgra_1010102" is_exported: true namespace: "core_graphics" description: "Enable BGRA_1010102 in the SDK" bug: "414794424" } flag { name: "draw_region" namespace: "core_graphics" Loading
libs/hwui/utils/Color.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <cmath> #include "SkColorSpace.h" #include "SkColorType.h" namespace android { namespace uirenderer { Loading Loading @@ -68,6 +69,10 @@ static inline SkImageInfo createImageInfo(int32_t width, int32_t height, int32_t colorType = kBGRA_8888_SkColorType; alphaType = kPremul_SkAlphaType; break; case AHARDWAREBUFFER_FORMAT_B10G10R10A2_UNORM: colorType = kBGRA_1010102_SkColorType; alphaType = kPremul_SkAlphaType; break; default: ALOGV("Unsupported format: %d, return unknown by default", format); break; Loading