Loading api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11791,6 +11791,7 @@ package android.graphics { enum_constant public static final android.graphics.Bitmap.Config ALPHA_8; enum_constant public static final deprecated android.graphics.Bitmap.Config ARGB_4444; enum_constant public static final android.graphics.Bitmap.Config ARGB_8888; enum_constant public static final android.graphics.Bitmap.Config HARDWARE; enum_constant public static final android.graphics.Bitmap.Config RGB_565; } api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -12281,6 +12281,7 @@ package android.graphics { enum_constant public static final android.graphics.Bitmap.Config ALPHA_8; enum_constant public static final deprecated android.graphics.Bitmap.Config ARGB_4444; enum_constant public static final android.graphics.Bitmap.Config ARGB_8888; enum_constant public static final android.graphics.Bitmap.Config HARDWARE; enum_constant public static final android.graphics.Bitmap.Config RGB_565; } api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11822,6 +11822,7 @@ package android.graphics { enum_constant public static final android.graphics.Bitmap.Config ALPHA_8; enum_constant public static final deprecated android.graphics.Bitmap.Config ARGB_4444; enum_constant public static final android.graphics.Bitmap.Config ARGB_8888; enum_constant public static final android.graphics.Bitmap.Config HARDWARE; enum_constant public static final android.graphics.Bitmap.Config RGB_565; } core/jni/android/graphics/BitmapFactory.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -276,6 +276,11 @@ static jobject doDecode(JNIEnv* env, SkStreamRewindable* stream, jobject padding } } if (isMutable && isHardware) { doThrowIAE(env, "Bitmaps with Config.HARWARE are always immutable"); return nullObjectReturn("Cannot create mutable hardware bitmap"); } // Create the codec. NinePatchPeeker peeker; std::unique_ptr<SkAndroidCodec> codec(SkAndroidCodec::NewFromStream(streamDeleter.release(), Loading graphics/java/android/graphics/Bitmap.java +16 −5 Original line number Diff line number Diff line Loading @@ -467,7 +467,11 @@ public final class Bitmap implements Parcelable { /** * @hide * Special configuration, when bitmap is stored only in graphic memory. * Bitmaps in this configuration are always immutable. * * It is optimal for cases, when the only operation with the bitmap is to draw it on a * screen. */ HARDWARE (6); Loading Loading @@ -810,7 +814,8 @@ public final class Bitmap implements Parcelable { * @param width The width of the bitmap * @param height The height of the bitmap * @param config The bitmap config to create. * @throws IllegalArgumentException if the width or height are <= 0 * @throws IllegalArgumentException if the width or height are <= 0, or if * Config is Config.HARDWARE, because hardware bitmaps are always immutable */ public static Bitmap createBitmap(int width, int height, Config config) { return createBitmap(width, height, config, true); Loading @@ -825,7 +830,8 @@ public final class Bitmap implements Parcelable { * @param width The width of the bitmap * @param height The height of the bitmap * @param config The bitmap config to create. * @throws IllegalArgumentException if the width or height are <= 0 * @throws IllegalArgumentException if the width or height are <= 0, or if * Config is Config.HARDWARE, because hardware bitmaps are always immutable */ public static Bitmap createBitmap(DisplayMetrics display, int width, int height, Config config) { Loading @@ -843,7 +849,8 @@ public final class Bitmap implements Parcelable { * bitmap as opaque. Doing so will clear the bitmap in black * instead of transparent. * * @throws IllegalArgumentException if the width or height are <= 0 * @throws IllegalArgumentException if the width or height are <= 0, or if * Config is Config.HARDWARE, because hardware bitmaps are always immutable */ private static Bitmap createBitmap(int width, int height, Config config, boolean hasAlpha) { return createBitmap(null, width, height, config, hasAlpha); Loading @@ -862,13 +869,17 @@ public final class Bitmap implements Parcelable { * bitmap as opaque. Doing so will clear the bitmap in black * instead of transparent. * * @throws IllegalArgumentException if the width or height are <= 0 * @throws IllegalArgumentException if the width or height are <= 0, or if * Config is Config.HARDWARE, because hardware bitmaps are always immutable */ private static Bitmap createBitmap(DisplayMetrics display, int width, int height, Config config, boolean hasAlpha) { if (width <= 0 || height <= 0) { throw new IllegalArgumentException("width and height must be > 0"); } if (config == Config.HARDWARE) { throw new IllegalArgumentException("can't create mutable bitmap with Config.HARDWARE"); } Bitmap bm = nativeCreate(null, 0, width, width, height, config.nativeInt, true); if (display != null) { bm.mDensity = display.densityDpi; Loading Loading
api/current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11791,6 +11791,7 @@ package android.graphics { enum_constant public static final android.graphics.Bitmap.Config ALPHA_8; enum_constant public static final deprecated android.graphics.Bitmap.Config ARGB_4444; enum_constant public static final android.graphics.Bitmap.Config ARGB_8888; enum_constant public static final android.graphics.Bitmap.Config HARDWARE; enum_constant public static final android.graphics.Bitmap.Config RGB_565; }
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -12281,6 +12281,7 @@ package android.graphics { enum_constant public static final android.graphics.Bitmap.Config ALPHA_8; enum_constant public static final deprecated android.graphics.Bitmap.Config ARGB_4444; enum_constant public static final android.graphics.Bitmap.Config ARGB_8888; enum_constant public static final android.graphics.Bitmap.Config HARDWARE; enum_constant public static final android.graphics.Bitmap.Config RGB_565; }
api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -11822,6 +11822,7 @@ package android.graphics { enum_constant public static final android.graphics.Bitmap.Config ALPHA_8; enum_constant public static final deprecated android.graphics.Bitmap.Config ARGB_4444; enum_constant public static final android.graphics.Bitmap.Config ARGB_8888; enum_constant public static final android.graphics.Bitmap.Config HARDWARE; enum_constant public static final android.graphics.Bitmap.Config RGB_565; }
core/jni/android/graphics/BitmapFactory.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -276,6 +276,11 @@ static jobject doDecode(JNIEnv* env, SkStreamRewindable* stream, jobject padding } } if (isMutable && isHardware) { doThrowIAE(env, "Bitmaps with Config.HARWARE are always immutable"); return nullObjectReturn("Cannot create mutable hardware bitmap"); } // Create the codec. NinePatchPeeker peeker; std::unique_ptr<SkAndroidCodec> codec(SkAndroidCodec::NewFromStream(streamDeleter.release(), Loading
graphics/java/android/graphics/Bitmap.java +16 −5 Original line number Diff line number Diff line Loading @@ -467,7 +467,11 @@ public final class Bitmap implements Parcelable { /** * @hide * Special configuration, when bitmap is stored only in graphic memory. * Bitmaps in this configuration are always immutable. * * It is optimal for cases, when the only operation with the bitmap is to draw it on a * screen. */ HARDWARE (6); Loading Loading @@ -810,7 +814,8 @@ public final class Bitmap implements Parcelable { * @param width The width of the bitmap * @param height The height of the bitmap * @param config The bitmap config to create. * @throws IllegalArgumentException if the width or height are <= 0 * @throws IllegalArgumentException if the width or height are <= 0, or if * Config is Config.HARDWARE, because hardware bitmaps are always immutable */ public static Bitmap createBitmap(int width, int height, Config config) { return createBitmap(width, height, config, true); Loading @@ -825,7 +830,8 @@ public final class Bitmap implements Parcelable { * @param width The width of the bitmap * @param height The height of the bitmap * @param config The bitmap config to create. * @throws IllegalArgumentException if the width or height are <= 0 * @throws IllegalArgumentException if the width or height are <= 0, or if * Config is Config.HARDWARE, because hardware bitmaps are always immutable */ public static Bitmap createBitmap(DisplayMetrics display, int width, int height, Config config) { Loading @@ -843,7 +849,8 @@ public final class Bitmap implements Parcelable { * bitmap as opaque. Doing so will clear the bitmap in black * instead of transparent. * * @throws IllegalArgumentException if the width or height are <= 0 * @throws IllegalArgumentException if the width or height are <= 0, or if * Config is Config.HARDWARE, because hardware bitmaps are always immutable */ private static Bitmap createBitmap(int width, int height, Config config, boolean hasAlpha) { return createBitmap(null, width, height, config, hasAlpha); Loading @@ -862,13 +869,17 @@ public final class Bitmap implements Parcelable { * bitmap as opaque. Doing so will clear the bitmap in black * instead of transparent. * * @throws IllegalArgumentException if the width or height are <= 0 * @throws IllegalArgumentException if the width or height are <= 0, or if * Config is Config.HARDWARE, because hardware bitmaps are always immutable */ private static Bitmap createBitmap(DisplayMetrics display, int width, int height, Config config, boolean hasAlpha) { if (width <= 0 || height <= 0) { throw new IllegalArgumentException("width and height must be > 0"); } if (config == Config.HARDWARE) { throw new IllegalArgumentException("can't create mutable bitmap with Config.HARDWARE"); } Bitmap bm = nativeCreate(null, 0, width, width, height, config.nativeInt, true); if (display != null) { bm.mDensity = display.densityDpi; Loading