[iOS] Make sure spawnee's isGpuDisabled is set correctly when FlutterEngine spawn (flutter/engine#29361)
This commit is contained in:
@@ -1034,6 +1034,7 @@ static void SetEntryPoint(flutter::Settings* settings, NSString* entrypoint, NSS
|
||||
result->_threadHost = _threadHost;
|
||||
result->_profiler = _profiler;
|
||||
result->_profiler_metrics = _profiler_metrics;
|
||||
result->_isGpuDisabled = _isGpuDisabled;
|
||||
[result setupShell:std::move(shell) withObservatoryPublication:NO];
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -24,10 +24,12 @@ FLUTTER_ASSERT_ARC
|
||||
- (void)testSpawn {
|
||||
FlutterEngineGroup* group = [[FlutterEngineGroup alloc] initWithName:@"foo" project:nil];
|
||||
FlutterEngine* spawner = [group makeEngineWithEntrypoint:nil libraryURI:nil];
|
||||
spawner.isGpuDisabled = YES;
|
||||
FlutterEngine* spawnee = [group makeEngineWithEntrypoint:nil libraryURI:nil];
|
||||
XCTAssertNotNil(spawner);
|
||||
XCTAssertNotNil(spawnee);
|
||||
XCTAssertEqual(&spawner.threadHost, &spawnee.threadHost);
|
||||
XCTAssertEqual(spawner.isGpuDisabled, spawnee.isGpuDisabled);
|
||||
}
|
||||
|
||||
- (void)testDeleteLastEngine {
|
||||
|
||||
Reference in New Issue
Block a user