Loading core/jni/android/graphics/BitmapRegionDecoder.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -155,12 +155,6 @@ static jobject nativeDecodeRegion(JNIEnv* env, jobject, jlong brdHandle, jint in env->SetObjectField(options, gOptions_outColorSpaceFieldID, 0); } SkBitmapRegionDecoder* brd = reinterpret_cast<SkBitmapRegionDecoder*>(brdHandle); SkColorType decodeColorType = brd->computeOutputColorType(colorType); sk_sp<SkColorSpace> decodeColorSpace = brd->computeOutputColorSpace( decodeColorType, colorSpace); // Recycle a bitmap if possible. android::Bitmap* recycledBitmap = nullptr; size_t recycledBytes = 0; Loading @@ -172,6 +166,9 @@ static jobject nativeDecodeRegion(JNIEnv* env, jobject, jlong brdHandle, jint in recycledBytes = bitmap::getBitmapAllocationByteCount(env, javaBitmap); } SkBitmapRegionDecoder* brd = reinterpret_cast<SkBitmapRegionDecoder*>(brdHandle); SkColorType decodeColorType = brd->computeOutputColorType(colorType); // Set up the pixel allocator SkBRDAllocator* allocator = nullptr; RecyclingClippingPixelAllocator recycleAlloc(recycledBitmap, recycledBytes); Loading @@ -184,6 +181,9 @@ static jobject nativeDecodeRegion(JNIEnv* env, jobject, jlong brdHandle, jint in allocator = &heapAlloc; } sk_sp<SkColorSpace> decodeColorSpace = brd->computeOutputColorSpace( decodeColorType, colorSpace); // Decode the region. SkIRect subset = SkIRect::MakeXYWH(inputX, inputY, inputWidth, inputHeight); SkBitmap bitmap; Loading Loading
core/jni/android/graphics/BitmapRegionDecoder.cpp +6 −6 Original line number Diff line number Diff line Loading @@ -155,12 +155,6 @@ static jobject nativeDecodeRegion(JNIEnv* env, jobject, jlong brdHandle, jint in env->SetObjectField(options, gOptions_outColorSpaceFieldID, 0); } SkBitmapRegionDecoder* brd = reinterpret_cast<SkBitmapRegionDecoder*>(brdHandle); SkColorType decodeColorType = brd->computeOutputColorType(colorType); sk_sp<SkColorSpace> decodeColorSpace = brd->computeOutputColorSpace( decodeColorType, colorSpace); // Recycle a bitmap if possible. android::Bitmap* recycledBitmap = nullptr; size_t recycledBytes = 0; Loading @@ -172,6 +166,9 @@ static jobject nativeDecodeRegion(JNIEnv* env, jobject, jlong brdHandle, jint in recycledBytes = bitmap::getBitmapAllocationByteCount(env, javaBitmap); } SkBitmapRegionDecoder* brd = reinterpret_cast<SkBitmapRegionDecoder*>(brdHandle); SkColorType decodeColorType = brd->computeOutputColorType(colorType); // Set up the pixel allocator SkBRDAllocator* allocator = nullptr; RecyclingClippingPixelAllocator recycleAlloc(recycledBitmap, recycledBytes); Loading @@ -184,6 +181,9 @@ static jobject nativeDecodeRegion(JNIEnv* env, jobject, jlong brdHandle, jint in allocator = &heapAlloc; } sk_sp<SkColorSpace> decodeColorSpace = brd->computeOutputColorSpace( decodeColorType, colorSpace); // Decode the region. SkIRect subset = SkIRect::MakeXYWH(inputX, inputY, inputWidth, inputHeight); SkBitmap bitmap; Loading