From 1822c1308c8f27885b1b25332731feccdfa4e43a Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Tue, 10 Mar 2020 23:22:19 -0700 Subject: [PATCH] Revert "Add support for the Metal backend on all iOS builds. (#17080)" This reverts commit e8e0e0b51b47017c950cdc2465ef92e66194c7a7. --- tools/gn | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/gn b/tools/gn index c921aba8b3fb3..b7cb71763da95 100755 --- a/tools/gn +++ b/tools/gn @@ -44,6 +44,9 @@ def get_out_dir(args): if args.enable_vulkan: target_dir.append('vulkan') + if args.enable_metal and args.target_os == 'ios': + target_dir.append('metal') + return os.path.join(args.out_dir, 'out', '_'.join(target_dir)) def to_command_line(gn_args): @@ -216,18 +219,17 @@ def to_gn_args(args): gn_args['use_goma'] = False gn_args['goma_dir'] = None + if args.enable_metal: + gn_args['skia_use_metal'] = True + gn_args['shell_enable_metal'] = True + gn_args['allow_deprecated_api_calls'] = True + if args.enable_vulkan: # Enable vulkan in the Flutter shell. gn_args['shell_enable_vulkan'] = True # Configure Skia for Vulkan support. gn_args['skia_use_vulkan'] = True - # Enable Metal on non-simulator iOS builds. - if args.target_os == 'ios': - gn_args['skia_use_metal'] = not args.simulator - gn_args['shell_enable_metal'] = not args.simulator - gn_args['allow_deprecated_api_calls'] = not args.simulator - # The buildroot currently isn't set up to support Vulkan in the # Windows ANGLE build, so disable it regardless of enable_vulkan's value. if sys.platform.startswith(('cygwin', 'win')):