Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
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
15 changes: 7 additions & 8 deletions shell/platform/darwin/ios/framework/Source/FlutterEngine.mm
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,6 @@ - (void)setupShell:(std::unique_ptr<flutter::Shell>)shell
_publisher.reset([[FlutterObservatoryPublisher alloc]
initWithEnableObservatoryPublication:doesObservatoryPublication]);
[self maybeSetupPlatformViewChannels];
_shell->GetIsGpuDisabledSyncSwitch()->SetSwitch(_isGpuDisabled ? true : false);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because that value is now getting set when the shell is created.

}

+ (BOOL)isProfilerEnabled {
Expand Down Expand Up @@ -611,15 +610,15 @@ - (BOOL)createShell:(NSString*)entrypoint
_threadHost->io_thread->GetTaskRunner() // io
);

_isGpuDisabled = [UIApplication sharedApplication].applicationState != UIApplicationStateActive;
// Create the shell. This is a blocking operation.
std::unique_ptr<flutter::Shell> shell = flutter::Shell::Create(
std::move(platformData), // window data
std::move(task_runners), // task runners
std::move(settings), // settings
on_create_platform_view, // platform view creation
on_create_rasterizer, // rasterzier creation
/*is_gpu_disabled=*/[UIApplication sharedApplication].applicationState !=
UIApplicationStateActive);
/*platform_data=*/std::move(platformData),
/*task_runners=*/std::move(task_runners),
/*settings=*/std::move(settings),
/*on_create_platform_view=*/on_create_platform_view,
/*on_create_rasterizer=*/on_create_rasterizer,
/*is_gpu_disabled=*/_isGpuDisabled);

if (shell == nullptr) {
FML_LOG(ERROR) << "Could not start a shell FlutterEngine with entrypoint: "
Expand Down