[iOS] enable FlutterMetalLayer. (flutter/engine#54121)

Re-enabled now that the retain cycle is fixed.
This commit is contained in:
Jonah Williams 2024-07-25 13:06:17 -07:00 committed by GitHub
parent f0901b70fc
commit d771655992

View File

@ -452,14 +452,14 @@ extern CFTimeInterval display_link_target;
}
+ (BOOL)enabled {
static BOOL enabled = NO;
static BOOL enabled = YES;
static BOOL didCheckInfoPlist = NO;
if (!didCheckInfoPlist) {
didCheckInfoPlist = YES;
NSNumber* use_flutter_metal_layer =
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"FLTUseFlutterMetalLayer"];
if (use_flutter_metal_layer != nil && [use_flutter_metal_layer boolValue]) {
enabled = YES;
if (use_flutter_metal_layer != nil && ![use_flutter_metal_layer boolValue]) {
enabled = NO;
}
}
return enabled;