From 0847b349a780dc5e7ed88adb835afff7e7e5237e Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Wed, 29 May 2024 13:59:16 -0700 Subject: [PATCH] [Impeller] revert changes to IO thread upload scheduling. (flutter/engine#53096) Fixes https://github.com/flutter/flutter/issues/147429 Turns out we need the I/O thread for all backends still to limit uploads otherwise we compete with the raster thread. --- .../flutter/lib/ui/painting/image_decoder_impeller.cc | 9 +-------- 1 file changed, 1 insertion(+), 8 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 cd081699f7..7060d33dcb 100644 --- a/engine/src/flutter/lib/ui/painting/image_decoder_impeller.cc +++ b/engine/src/flutter/lib/ui/painting/image_decoder_impeller.cc @@ -488,8 +488,6 @@ void ImageDecoderImpeller::Decode(fml::RefPtr descriptor, return; } - sk_sp image; - std::string decode_error; auto upload_texture_and_invoke_result = [result, context, bitmap_result, gpu_disabled_switch]() { sk_sp image; @@ -499,12 +497,7 @@ void ImageDecoderImpeller::Decode(fml::RefPtr descriptor, bitmap_result.sk_bitmap, gpu_disabled_switch); result(image, decode_error); }; - if (context->GetBackendType() == - impeller::Context::BackendType::kOpenGLES) { - io_runner->PostTask(upload_texture_and_invoke_result); - } else { - upload_texture_and_invoke_result(); - } + io_runner->PostTask(upload_texture_and_invoke_result); }); }