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

Commit 9dd76020 authored by Priyanka Advani (xWF)'s avatar Priyanka Advani (xWF) Committed by Android (Google) Code Review
Browse files

Revert "Push atoms for decoding images"

Revert submission 29797578-image-atoms

Reason for revert: Droidmonitor created revert due to b/377318069. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:29797578-image-atoms

Change-Id: Ic952f37ce480d3c1fbdac847c2a9ea74235c47dd
parent 0ba21a75
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -579,7 +579,6 @@ cc_defaults {
        "utils/Color.cpp",
        "utils/LinearAllocator.cpp",
        "utils/StringUtils.cpp",
        "utils/StatsUtils.cpp",
        "utils/TypefaceUtils.cpp",
        "utils/VectorDrawableUtils.cpp",
        "AnimationContext.cpp",
+1 −3
Original line number Diff line number Diff line
@@ -27,8 +27,8 @@
#include <SkColorSpace.h>
#include <SkColorType.h>
#include <SkEncodedOrigin.h>
#include <SkGainmapInfo.h>
#include <SkImageInfo.h>
#include <SkGainmapInfo.h>
#include <SkMatrix.h>
#include <SkPaint.h>
#include <SkPngChunkReader.h>
@@ -43,8 +43,6 @@

#include <memory>

#include "modules/skcms/src/skcms_public.h"

using namespace android;

sk_sp<SkColorSpace> ImageDecoder::getDefaultColorSpace() const {
+0 −4
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@
#include <stdint.h>
#include <stdio.h>
#include <sys/stat.h>
#include <utils/StatsUtils.h>

#include <memory>

@@ -631,7 +630,6 @@ static jobject doDecode(JNIEnv* env, std::unique_ptr<SkStreamRewindable> stream,
        }
        bitmap::reinitBitmap(env, javaBitmap, outputBitmap.info(), isPremultiplied);
        outputBitmap.notifyPixelsChanged();
        uirenderer::logBitmapDecode(*reuseBitmap);
        // If a java bitmap was passed in for reuse, pass it back
        return javaBitmap;
    }
@@ -652,7 +650,6 @@ static jobject doDecode(JNIEnv* env, std::unique_ptr<SkStreamRewindable> stream,
            }
        }

        uirenderer::logBitmapDecode(*hardwareBitmap);
        return bitmap::createBitmap(env, hardwareBitmap.release(), bitmapCreateFlags,
                ninePatchChunk, ninePatchInsets, -1);
    }
@@ -662,7 +659,6 @@ static jobject doDecode(JNIEnv* env, std::unique_ptr<SkStreamRewindable> stream,
        heapBitmap->setGainmap(std::move(gainmap));
    }

    uirenderer::logBitmapDecode(*heapBitmap);
    // now create the java bitmap
    return bitmap::createBitmap(env, heapBitmap, bitmapCreateFlags, ninePatchChunk, ninePatchInsets,
                                -1);
+0 −4
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@
#include <HardwareBitmapUploader.h>
#include <androidfw/Asset.h>
#include <sys/stat.h>
#include <utils/StatsUtils.h>

#include <memory>

@@ -377,7 +376,6 @@ static jobject nativeDecodeRegion(JNIEnv* env, jobject, jlong brdHandle, jint in
            recycledBitmap->setGainmap(std::move(gainmap));
        }
        bitmap::reinitBitmap(env, javaBitmap, recycledBitmap->info(), !requireUnpremul);
        uirenderer::logBitmapDecode(*recycledBitmap);
        return javaBitmap;
    }

@@ -394,14 +392,12 @@ static jobject nativeDecodeRegion(JNIEnv* env, jobject, jlong brdHandle, jint in
                hardwareBitmap->setGainmap(std::move(gm));
            }
        }
        uirenderer::logBitmapDecode(*hardwareBitmap);
        return bitmap::createBitmap(env, hardwareBitmap.release(), bitmapCreateFlags);
    }
    Bitmap* heapBitmap = heapAlloc.getStorageObjAndReset();
    if (hasGainmap && heapBitmap != nullptr) {
        heapBitmap->setGainmap(std::move(gainmap));
    }
    uirenderer::logBitmapDecode(*heapBitmap);
    return android::bitmap::createBitmap(env, heapBitmap, bitmapCreateFlags);
}

+0 −4
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@
#include <hwui/Bitmap.h>
#include <hwui/ImageDecoder.h>
#include <sys/stat.h>
#include <utils/StatsUtils.h>

#include "Bitmap.h"
#include "BitmapFactory.h"
@@ -486,7 +485,6 @@ static jobject ImageDecoder_nDecodeBitmap(JNIEnv* env, jobject /*clazz*/, jlong
                        hwBitmap->setGainmap(std::move(gm));
                    }
                }
                uirenderer::logBitmapDecode(*hwBitmap);
                return bitmap::createBitmap(env, hwBitmap.release(), bitmapCreateFlags,
                                            ninePatchChunk, ninePatchInsets);
            }
@@ -500,8 +498,6 @@ static jobject ImageDecoder_nDecodeBitmap(JNIEnv* env, jobject /*clazz*/, jlong

        nativeBitmap->setImmutable();
    }

    uirenderer::logBitmapDecode(*nativeBitmap);
    return bitmap::createBitmap(env, nativeBitmap.release(), bitmapCreateFlags, ninePatchChunk,
                                ninePatchInsets);
}
Loading