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

Commit a2c8a7b5 authored by Jean-Baptiste Queru's avatar Jean-Baptiste Queru Committed by Android Git Automerger
Browse files

am ec5039b3: am 99c070d8: am 4fea5373: Merge "Add WEBP to the list of Image...

am ec5039b3: am 99c070d8: am 4fea5373: Merge "Add WEBP to the list of Image formats that support Compression."

* commit 'ec5039b3':
  Add WEBP to the list of Image formats that support Compression.
parents 2fdbb37f ec5039b3
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -273,7 +273,8 @@ static void Bitmap_recycle(JNIEnv* env, jobject, SkBitmap* bitmap) {
// These must match the int values in Bitmap.java
enum JavaEncodeFormat {
    kJPEG_JavaEncodeFormat = 0,
    kPNG_JavaEncodeFormat = 1
    kPNG_JavaEncodeFormat = 1,
    kWEBP_JavaEncodeFormat = 2
};

static bool Bitmap_compress(JNIEnv* env, jobject clazz, SkBitmap* bitmap,
@@ -288,6 +289,9 @@ static bool Bitmap_compress(JNIEnv* env, jobject clazz, SkBitmap* bitmap,
    case kPNG_JavaEncodeFormat:
        fm = SkImageEncoder::kPNG_Type;
        break;
    case kWEBP_JavaEncodeFormat:
        fm = SkImageEncoder::kWEBP_Type;
        break;
    default:
        return false;
    }
+2 −1
Original line number Diff line number Diff line
@@ -681,7 +681,8 @@ public final class Bitmap implements Parcelable {
     */
    public enum CompressFormat {
        JPEG    (0),
        PNG     (1);
        PNG     (1),
        WEBP    (2);

        CompressFormat(int nativeInt) {
            this.nativeInt = nativeInt;