Write Bitmap's color space in parcel

This change also resets the cached color space field in Bitmap.java
when reconfigure() is called or when a bitmap is reused by the
bitmap factory.

Bug: 32072280
Test: CtsGraphicsTestCases.BitmapColorSpaceTest
Change-Id: I232b729b7a29e65bfff21dc749570c3c80adf855
This commit is contained in:
Romain Guy
2017-03-07 15:29:27 -08:00
parent efb4b06493
commit 5acc476878
2 changed files with 20 additions and 13 deletions

View File

@ -147,6 +147,7 @@ public final class Bitmap implements Parcelable {
mWidth = width;
mHeight = height;
mRequestPremultiplied = requestPremultiplied;
mColorSpace = null;
}
/**
@ -254,6 +255,7 @@ public final class Bitmap implements Parcelable {
nativeReconfigure(mNativePtr, width, height, config.nativeInt, mRequestPremultiplied);
mWidth = width;
mHeight = height;
mColorSpace = null;
}
/**