diff options
| author | 2023-02-15 17:53:07 -0800 | |
|---|---|---|
| committer | 2023-02-17 06:33:46 +0000 | |
| commit | 39ac0885be980be540a3b64474ebc89ee1a1671c (patch) | |
| tree | bdfe17422081d8b40d2ac995a43275f27d88db30 | |
| parent | dd76f4b3fc2fde1122b15c8dfa89f5cdb43dc6d7 (diff) | |
Rename Alpha type constant
Rename PREMUL and PREMULT constants to PREMULTIPLIED and
UNPREMULTIPLIED to better match with Skia naming convention
for SkAlphaType.
Fixes: 269491516
Test: Re-ran MeshTest
Change-Id: If9d96143fdcb2e77803830f2be0c85160bec108d
| -rw-r--r-- | core/api/current.txt | 4 | ||||
| -rw-r--r-- | graphics/java/android/graphics/MeshSpecification.java | 15 |
2 files changed, 10 insertions, 9 deletions
diff --git a/core/api/current.txt b/core/api/current.txt index 2968b59e16c9..eef16bebea83 100644 --- a/core/api/current.txt +++ b/core/api/current.txt @@ -15782,9 +15782,9 @@ package android.graphics { method @NonNull public static android.graphics.MeshSpecification make(@NonNull @Size(max=8) android.graphics.MeshSpecification.Attribute[], @IntRange(from=1, to=1024) int, @NonNull @Size(max=6) android.graphics.MeshSpecification.Varying[], @NonNull String, @NonNull String, @NonNull android.graphics.ColorSpace); method @NonNull public static android.graphics.MeshSpecification make(@NonNull @Size(max=8) android.graphics.MeshSpecification.Attribute[], @IntRange(from=1, to=1024) int, @NonNull @Size(max=6) android.graphics.MeshSpecification.Varying[], @NonNull String, @NonNull String, @NonNull android.graphics.ColorSpace, int); field public static final int ALPHA_TYPE_OPAQUE = 1; // 0x1 - field public static final int ALPHA_TYPE_PREMUL = 2; // 0x2 - field public static final int ALPHA_TYPE_PREMULT = 3; // 0x3 + field public static final int ALPHA_TYPE_PREMULTIPLIED = 2; // 0x2 field public static final int ALPHA_TYPE_UNKNOWN = 0; // 0x0 + field public static final int ALPHA_TYPE_UNPREMULTIPLIED = 3; // 0x3 field public static final int TYPE_FLOAT = 0; // 0x0 field public static final int TYPE_FLOAT2 = 1; // 0x1 field public static final int TYPE_FLOAT3 = 2; // 0x2 diff --git a/graphics/java/android/graphics/MeshSpecification.java b/graphics/java/android/graphics/MeshSpecification.java index 02015258d6a9..70311fdb2d1f 100644 --- a/graphics/java/android/graphics/MeshSpecification.java +++ b/graphics/java/android/graphics/MeshSpecification.java @@ -54,7 +54,8 @@ public class MeshSpecification { */ @IntDef( prefix = {"ALPHA_TYPE_"}, - value = {ALPHA_TYPE_UNKNOWN, ALPHA_TYPE_OPAQUE, ALPHA_TYPE_PREMUL, ALPHA_TYPE_PREMULT} + value = {ALPHA_TYPE_UNKNOWN, ALPHA_TYPE_OPAQUE, ALPHA_TYPE_PREMULTIPLIED, + ALPHA_TYPE_UNPREMULTIPLIED} ) @Retention(RetentionPolicy.SOURCE) private @interface AlphaType {} @@ -72,12 +73,12 @@ public class MeshSpecification { /** * Pixel components are premultiplied by alpha. */ - public static final int ALPHA_TYPE_PREMUL = 2; + public static final int ALPHA_TYPE_PREMULTIPLIED = 2; /** * Pixel components are independent of alpha. */ - public static final int ALPHA_TYPE_PREMULT = 3; + public static final int ALPHA_TYPE_UNPREMULTIPLIED = 3; /** * Constants for {@link Attribute} and {@link Varying} for determining the data type. @@ -220,7 +221,7 @@ public class MeshSpecification { /** * Creates a {@link MeshSpecification} object for use within {@link Mesh}. This uses a default * color space of {@link ColorSpace.Named#SRGB} and {@link AlphaType} of - * {@link #ALPHA_TYPE_PREMUL}. + * {@link #ALPHA_TYPE_PREMULTIPLIED}. * * @param attributes list of attributes represented by {@link Attribute}. Can hold a max of * 8. @@ -253,7 +254,7 @@ public class MeshSpecification { /** * Creates a {@link MeshSpecification} object. This uses a default {@link AlphaType} of - * {@link #ALPHA_TYPE_PREMUL}. + * {@link #ALPHA_TYPE_PREMULTIPLIED}. * * @param attributes list of attributes represented by {@link Attribute}. Can hold a max of * 8. @@ -306,8 +307,8 @@ public class MeshSpecification { * one of * {@link MeshSpecification#ALPHA_TYPE_UNKNOWN}, * {@link MeshSpecification#ALPHA_TYPE_OPAQUE}, - * {@link MeshSpecification#ALPHA_TYPE_PREMUL}, or - * {@link MeshSpecification#ALPHA_TYPE_PREMULT} + * {@link MeshSpecification#ALPHA_TYPE_PREMULTIPLIED}, or + * {@link MeshSpecification#ALPHA_TYPE_UNPREMULTIPLIED} * @return {@link MeshSpecification} object for use when creating {@link Mesh} */ @NonNull |