@@ -44,6 +44,9 @@ 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+
4750 return os .path .join (args .out_dir , 'out' , '_' .join (target_dir ))
4851
4952def to_command_line (gn_args ):
@@ -216,18 +219,17 @@ def to_gn_args(args):
216219 gn_args ['use_goma' ] = False
217220 gn_args ['goma_dir' ] = None
218221
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+
219227 if args .enable_vulkan :
220228 # Enable vulkan in the Flutter shell.
221229 gn_args ['shell_enable_vulkan' ] = True
222230 # Configure Skia for Vulkan support.
223231 gn_args ['skia_use_vulkan' ] = True
224232
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-
231233 # The buildroot currently isn't set up to support Vulkan in the
232234 # Windows ANGLE build, so disable it regardless of enable_vulkan's value.
233235 if sys .platform .startswith (('cygwin' , 'win' )):
0 commit comments