Disable FlutterMetalLayer by default. (flutter/engine#54095)
Backing textures aren't getting deallocated, which is causing memory leaks and crashing devicelab.
This commit is contained in:
parent
dc9ff41cb8
commit
f4ca71ce57
@ -424,14 +424,14 @@ extern CFTimeInterval display_link_target;
|
||||
}
|
||||
|
||||
+ (BOOL)enabled {
|
||||
static BOOL enabled = YES;
|
||||
static BOOL enabled = NO;
|
||||
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 = NO;
|
||||
if (use_flutter_metal_layer != nil && [use_flutter_metal_layer boolValue]) {
|
||||
enabled = YES;
|
||||
}
|
||||
}
|
||||
return enabled;
|
||||
|
Loading…
x
Reference in New Issue
Block a user