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

Commit e2d4959e authored by John Reck's avatar John Reck Committed by Automerger Merge Worker
Browse files

Merge "Null out gainmaps on inBitmap re-use" into udc-dev am: 03aa3655 am: f2720e59

parents cc4114be f2720e59
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1921,6 +1921,7 @@ public final class Bitmap implements Parcelable {
     */
    public void setGainmap(@Nullable Gainmap gainmap) {
        checkRecycled("Bitmap is recycled");
        mGainmap = null;
        nativeSetGainmap(mNativePtr, gainmap == null ? 0 : gainmap.mNativePtr);
    }

+3 −1
Original line number Diff line number Diff line
@@ -482,7 +482,9 @@ public class BitmapFactory {
            if (opts == null || opts.inBitmap == null) {
                return 0;
            }

            // Clear out the gainmap since we don't attempt to reuse it and don't want to
            // accidentally keep it on the re-used bitmap
            opts.inBitmap.setGainmap(null);
            return opts.inBitmap.getNativeInstance();
        }