From 7b228c8b4b02ae6a7159270533a3f864995cce2e Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Wed, 22 Mar 2023 17:54:01 -0700 Subject: [PATCH] [impeller] always copy bitmaps when given unencoded data (flutter/engine#40543) [impeller] always copy bitmaps when given unencoded data --- engine/src/flutter/lib/ui/painting/image_decoder_impeller.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/engine/src/flutter/lib/ui/painting/image_decoder_impeller.cc b/engine/src/flutter/lib/ui/painting/image_decoder_impeller.cc index 58b24b07e7..51a651f7fb 100644 --- a/engine/src/flutter/lib/ui/painting/image_decoder_impeller.cc +++ b/engine/src/flutter/lib/ui/painting/image_decoder_impeller.cc @@ -193,11 +193,6 @@ std::optional ImageDecoderImpeller::DecompressTexture( FML_DLOG(ERROR) << "Could not decompress image."; return std::nullopt; } - } else if (image_info.colorType() == base_image_info.colorType()) { - auto pixel_ref = SkMallocPixelRef::MakeWithData( - image_info, descriptor->row_bytes(), descriptor->data()); - bitmap->setPixelRef(pixel_ref, 0, 0); - bitmap->setImmutable(); } else { auto temp_bitmap = std::make_shared(); temp_bitmap->setInfo(base_image_info);