@@ -44,9 +44,6 @@ def get_out_dir(args):
4444 if args .enable_vulkan :
4545 target_dir .append ('vulkan' )
4646
47- if args .enable_metal and args .target_os == 'ios' :
48- target_dir .append ('metal' )
49-
5047 return os .path .join (args .out_dir , 'out' , '_' .join (target_dir ))
5148
5249def to_command_line (gn_args ):
@@ -219,17 +216,18 @@ def to_gn_args(args):
219216 gn_args ['use_goma' ] = False
220217 gn_args ['goma_dir' ] = None
221218
222- if args .enable_metal :
223- gn_args ['skia_use_metal' ] = True
224- gn_args ['shell_enable_metal' ] = True
225- gn_args ['allow_deprecated_api_calls' ] = True
226-
227219 if args .enable_vulkan :
228220 # Enable vulkan in the Flutter shell.
229221 gn_args ['shell_enable_vulkan' ] = True
230222 # Configure Skia for Vulkan support.
231223 gn_args ['skia_use_vulkan' ] = True
232224
225+ # Enable Metal on non-simulator iOS builds.
226+ if args .target_os == 'ios' :
227+ gn_args ['skia_use_metal' ] = not args .simulator
228+ gn_args ['shell_enable_metal' ] = not args .simulator
229+ gn_args ['allow_deprecated_api_calls' ] = not args .simulator
230+
233231 # The buildroot currently isn't set up to support Vulkan in the
234232 # Windows ANGLE build, so disable it regardless of enable_vulkan's value.
235233 if sys .platform .startswith (('cygwin' , 'win' )):
0 commit comments