Mutable Java Shaders with Immutable Native Shaders

bug: 17641888
Change-Id: I0f05387423cde185dab1a1453f89d5251ca1a4f9
This commit is contained in:
Derek Sollenberger
2014-09-02 15:42:54 -04:00
parent b615e567aa
commit dfba4d3d11
12 changed files with 120 additions and 93 deletions

View File

@@ -1542,7 +1542,7 @@ public final class Bitmap implements Parcelable {
*/
public Bitmap extractAlpha(Paint paint, int[] offsetXY) {
checkRecycled("Can't extractAlpha on a recycled bitmap");
long nativePaint = paint != null ? paint.mNativePaint : 0;
long nativePaint = paint != null ? paint.getNativeInstance() : 0;
Bitmap bm = nativeExtractAlpha(mNativeBitmap, nativePaint, offsetXY);
if (bm == null) {
throw new RuntimeException("Failed to extractAlpha on Bitmap");