[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.
This commit is contained in:
Jonah Williams
2024-05-29 13:59:16 -07:00
committed by GitHub
parent 4512c9eb76
commit 0847b349a7

View File

@@ -488,8 +488,6 @@ void ImageDecoderImpeller::Decode(fml::RefPtr<ImageDescriptor> descriptor,
return;
}
sk_sp<DlImage> image;
std::string decode_error;
auto upload_texture_and_invoke_result = [result, context, bitmap_result,
gpu_disabled_switch]() {
sk_sp<DlImage> image;
@@ -499,12 +497,7 @@ void ImageDecoderImpeller::Decode(fml::RefPtr<ImageDescriptor> 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);
});
}