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

Commit f4f0bf3

Browse files
author
Jonah Williams
authored
Disable FlutterMetalLayer by default. (#54095)
Backing textures aren't getting deallocated, which is causing memory leaks and crashing devicelab.
1 parent a57655c commit f4f0bf3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,14 +424,14 @@ - (void)returnTexture:(FlutterTexture*)texture {
424424
}
425425

426426
+ (BOOL)enabled {
427-
static BOOL enabled = YES;
427+
static BOOL enabled = NO;
428428
static BOOL didCheckInfoPlist = NO;
429429
if (!didCheckInfoPlist) {
430430
didCheckInfoPlist = YES;
431431
NSNumber* use_flutter_metal_layer =
432432
[[NSBundle mainBundle] objectForInfoDictionaryKey:@"FLTUseFlutterMetalLayer"];
433-
if (use_flutter_metal_layer != nil && ![use_flutter_metal_layer boolValue]) {
434-
enabled = NO;
433+
if (use_flutter_metal_layer != nil && [use_flutter_metal_layer boolValue]) {
434+
enabled = YES;
435435
}
436436
}
437437
return enabled;

0 commit comments

Comments
 (0)