Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit c2090c2

Browse files
[iOS] Make sure spawnee's isGpuDisabled is set correctly when FlutterEngine spawn (#29361)
1 parent 91033b9 commit c2090c2

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

shell/platform/darwin/ios/framework/Source/FlutterEngine.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,6 +1034,7 @@ - (FlutterEngine*)spawnWithEntrypoint:(/*nullable*/ NSString*)entrypoint
10341034
result->_threadHost = _threadHost;
10351035
result->_profiler = _profiler;
10361036
result->_profiler_metrics = _profiler_metrics;
1037+
result->_isGpuDisabled = _isGpuDisabled;
10371038
[result setupShell:std::move(shell) withObservatoryPublication:NO];
10381039
return result;
10391040
}

shell/platform/darwin/ios/framework/Source/FlutterEngineGroupTest.mm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ - (void)testMake {
2424
- (void)testSpawn {
2525
FlutterEngineGroup* group = [[FlutterEngineGroup alloc] initWithName:@"foo" project:nil];
2626
FlutterEngine* spawner = [group makeEngineWithEntrypoint:nil libraryURI:nil];
27+
spawner.isGpuDisabled = YES;
2728
FlutterEngine* spawnee = [group makeEngineWithEntrypoint:nil libraryURI:nil];
2829
XCTAssertNotNil(spawner);
2930
XCTAssertNotNil(spawnee);
3031
XCTAssertEqual(&spawner.threadHost, &spawnee.threadHost);
32+
XCTAssertEqual(spawner.isGpuDisabled, spawnee.isGpuDisabled);
3133
}
3234

3335
- (void)testDeleteLastEngine {

0 commit comments

Comments
 (0)