Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/ui/painting/image_decoder_impeller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,13 @@ void ImageDecoderImpeller::Decode(fml::RefPtr<ImageDescriptor> descriptor,
result,
supports_wide_gamut = supports_wide_gamut_, //
gpu_disabled_switch = gpu_disabled_switch_]() {
#if FML_OS_IOS_SIMULATOR
// No-op backend.
if (!context) {
return;
}
#endif // FML_OS_IOS_SIMULATOR

if (!context) {
result(nullptr, "No Impeller context is available");
return;
Expand Down
11 changes: 11 additions & 0 deletions lib/ui/painting/multi_frame_codec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,17 @@ void MultiFrameCodec::State::GetNextFrameAndInvokeCallback(
const std::shared_ptr<const fml::SyncSwitch>& gpu_disable_sync_switch,
size_t trace_id,
const std::shared_ptr<impeller::Context>& impeller_context) {
#if FML_OS_IOS_SIMULATOR
// Noop backend.
if (!resourceContext && !impeller_context) {
ui_task_runner->PostTask(
fml::MakeCopyable([callback = std::move(callback)]() {
// must be destroyed on UI thread.
}));
return;
}
#endif // FML_OS_IOS_SIMULATOR

fml::RefPtr<CanvasImage> image = nullptr;
int duration = 0;
sk_sp<DlImage> dlImage;
Expand Down