From 85ed6567226e7c4d6f6ea456090ab43249c48682 Mon Sep 17 00:00:00 2001 From: Pieter van Loon Date: Thu, 8 Oct 2020 02:47:03 +0200 Subject: [PATCH] Enabled metal on ios simulator (#17881) --- shell/common/switches.h | 2 +- shell/gpu/gpu_surface_metal.h | 3 +- .../ios/framework/Source/FlutterEngine.mm | 5 ++- .../darwin/ios/framework/Source/FlutterView.h | 3 +- .../ios/framework/Source/FlutterView.mm | 13 ++++++- .../framework/Source/FlutterViewController.mm | 6 ++++ shell/platform/darwin/ios/ios_surface.mm | 18 ++++++---- shell/platform/darwin/ios/ios_surface_metal.h | 4 ++- .../darwin/ios/rendering_api_selection.h | 18 ++++++++-- .../darwin/ios/rendering_api_selection.mm | 36 +++++++++++++------ .../Scenarios.xcodeproj/project.pbxproj | 4 +++ .../ios/Scenarios/Scenarios/AppDelegate.m | 13 ++++++- .../GoldenPlatformViewTests.m | 2 +- .../PlatformViewGestureRecognizerTests.m | 3 +- .../ScenariosUITests/RenderingSelectionTest.m | 34 ++++++++++++++++++ .../UnobstructedPlatformViewTests.m | 3 +- tools/gn | 4 +-- 17 files changed, 138 insertions(+), 33 deletions(-) create mode 100644 testing/scenario_app/ios/Scenarios/ScenariosUITests/RenderingSelectionTest.m diff --git a/shell/common/switches.h b/shell/common/switches.h index f33e27224..260214db4 100644 --- a/shell/common/switches.h +++ b/shell/common/switches.h @@ -97,7 +97,7 @@ DEF_SWITCH(EnableSoftwareRendering, "enable-software-rendering", "Enable rendering using the Skia software backend. This is useful " "when testing Flutter on emulators. By default, Flutter will " - "attempt to either use OpenGL or Vulkan.") + "attempt to either use OpenGL, Metal, or Vulkan.") DEF_SWITCH(SkiaDeterministicRendering, "skia-deterministic-rendering", "Skips the call to SkGraphics::Init(), thus avoiding swapping out " diff --git a/shell/gpu/gpu_surface_metal.h b/shell/gpu/gpu_surface_metal.h index 42d9851d5..5a91307af 100644 --- a/shell/gpu/gpu_surface_metal.h +++ b/shell/gpu/gpu_surface_metal.h @@ -12,12 +12,13 @@ #include "flutter/fml/platform/darwin/scoped_nsobject.h" #include "flutter/shell/gpu/gpu_surface_delegate.h" #include "third_party/skia/include/gpu/GrDirectContext.h" +#include "third_party/skia/include/gpu/mtl/GrMtlTypes.h" @class CAMetalLayer; namespace flutter { -class GPUSurfaceMetal : public Surface { +class SK_API_AVAILABLE_CA_METAL_LAYER GPUSurfaceMetal : public Surface { public: GPUSurfaceMetal(GPUSurfaceDelegate* delegate, fml::scoped_nsobject layer, diff --git a/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm b/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm index 347b85327..259253774 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterEngine.mm @@ -474,6 +474,8 @@ static constexpr int kNumProfilerSamplesPerSec = 5; self.initialRoute = initialRoute; auto settings = [_dartProject.get() settings]; + FlutterView.forceSoftwareRendering = settings.enable_software_rendering; + auto platformData = [_dartProject.get() defaultPlatformData]; if (libraryURI) { @@ -513,7 +515,8 @@ static constexpr int kNumProfilerSamplesPerSec = 5; flutter::Shell::CreateCallback on_create_platform_view = [](flutter::Shell& shell) { return std::make_unique( - shell, flutter::GetRenderingAPIForProcess(), shell.GetTaskRunners()); + shell, flutter::GetRenderingAPIForProcess(FlutterView.forceSoftwareRendering), + shell.GetTaskRunners()); }; flutter::Shell::CreateCallback on_create_rasterizer = diff --git a/shell/platform/darwin/ios/framework/Source/FlutterView.h b/shell/platform/darwin/ios/framework/Source/FlutterView.h index 2806c3359..3a9c138de 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterView.h +++ b/shell/platform/darwin/ios/framework/Source/FlutterView.h @@ -21,7 +21,6 @@ asBase64Encoded:(BOOL)base64Encode; - (flutter::FlutterPlatformViewsController*)platformViewsController; - @end @interface FlutterView : UIView @@ -35,6 +34,8 @@ opaque:(BOOL)opaque NS_DESIGNATED_INITIALIZER; - (std::unique_ptr)createSurface:(std::shared_ptr)context; +// Set by FlutterEngine or FlutterViewController to override software rendering. +@property(class, nonatomic) BOOL forceSoftwareRendering; @end #endif // SHELL_PLATFORM_IOS_FRAMEWORK_SOURCE_FLUTTER_VIEW_H_ diff --git a/shell/platform/darwin/ios/framework/Source/FlutterView.mm b/shell/platform/darwin/ios/framework/Source/FlutterView.mm index 8fb97f683..3f6b19dec 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterView.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterView.mm @@ -68,8 +68,19 @@ [super layoutSubviews]; } +static BOOL _forceSoftwareRendering; + ++ (BOOL)forceSoftwareRendering { + return _forceSoftwareRendering; +} + ++ (void)setForceSoftwareRendering:(BOOL)forceSoftwareRendering { + _forceSoftwareRendering = forceSoftwareRendering; +} + + (Class)layerClass { - return flutter::GetCoreAnimationLayerClassForRenderingAPI(); + return flutter::GetCoreAnimationLayerClassForRenderingAPI( + flutter::GetRenderingAPIForProcess(FlutterView.forceSoftwareRendering)); } - (std::unique_ptr)createSurface: diff --git a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm index 792256082..ed7e1d79f 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm @@ -157,6 +157,12 @@ typedef enum UIAccessibilityContrast : NSInteger { - (void)sharedSetupWithProject:(nullable FlutterDartProject*)project initialRoute:(nullable NSString*)initialRoute { + // Need the project to get settings for the view. Initializing it here means + // the Engine class won't initialize it later. + if (!project) { + project = [[[FlutterDartProject alloc] init] autorelease]; + } + FlutterView.forceSoftwareRendering = project.settings.enable_software_rendering; auto engine = fml::scoped_nsobject{[[FlutterEngine alloc] initWithName:@"io.flutter" project:project diff --git a/shell/platform/darwin/ios/ios_surface.mm b/shell/platform/darwin/ios/ios_surface.mm index 976c71ee4..331cbeb8a 100644 --- a/shell/platform/darwin/ios/ios_surface.mm +++ b/shell/platform/darwin/ios/ios_surface.mm @@ -7,6 +7,8 @@ #import "flutter/shell/platform/darwin/ios/ios_surface_gl.h" #import "flutter/shell/platform/darwin/ios/ios_surface_software.h" +#include "flutter/shell/platform/darwin/ios/rendering_api_selection.h" + #if FLUTTER_SHELL_ENABLE_METAL #import "flutter/shell/platform/darwin/ios/ios_surface_metal.h" #endif // FLUTTER_SHELL_ENABLE_METAL @@ -30,13 +32,15 @@ std::unique_ptr IOSSurface::Create( } #if FLUTTER_SHELL_ENABLE_METAL - if ([layer.get() isKindOfClass:[CAMetalLayer class]]) { - return std::make_unique( - fml::scoped_nsobject( - reinterpret_cast([layer.get() retain])), // Metal layer - std::move(context), // context - platform_views_controller // platform views controller - ); + if (@available(iOS METAL_IOS_VERSION_BASELINE, *)) { + if ([layer.get() isKindOfClass:[CAMetalLayer class]]) { + return std::make_unique( + fml::scoped_nsobject( + reinterpret_cast([layer.get() retain])), // Metal layer + std::move(context), // context + platform_views_controller // platform views controller + ); + } } #endif // FLUTTER_SHELL_ENABLE_METAL diff --git a/shell/platform/darwin/ios/ios_surface_metal.h b/shell/platform/darwin/ios/ios_surface_metal.h index 7d1e4d5d1..c449248ed 100644 --- a/shell/platform/darwin/ios/ios_surface_metal.h +++ b/shell/platform/darwin/ios/ios_surface_metal.h @@ -8,12 +8,14 @@ #include "flutter/fml/macros.h" #include "flutter/shell/gpu/gpu_surface_delegate.h" #import "flutter/shell/platform/darwin/ios/ios_surface.h" +#include "third_party/skia/include/gpu/mtl/GrMtlTypes.h" @class CAMetalLayer; namespace flutter { -class IOSSurfaceMetal final : public IOSSurface, public GPUSurfaceDelegate { +class SK_API_AVAILABLE_CA_METAL_LAYER IOSSurfaceMetal final : public IOSSurface, + public GPUSurfaceDelegate { public: IOSSurfaceMetal(fml::scoped_nsobject layer, std::shared_ptr context, diff --git a/shell/platform/darwin/ios/rendering_api_selection.h b/shell/platform/darwin/ios/rendering_api_selection.h index f30a49a09..07fe13ccb 100644 --- a/shell/platform/darwin/ios/rendering_api_selection.h +++ b/shell/platform/darwin/ios/rendering_api_selection.h @@ -17,11 +17,23 @@ enum class IOSRenderingAPI { kMetal, }; -IOSRenderingAPI GetRenderingAPIForProcess(); +// Pass force_software to force software rendering. This is only respected on +// simulators. +IOSRenderingAPI GetRenderingAPIForProcess(bool force_software); -Class GetCoreAnimationLayerClassForRenderingAPI( - IOSRenderingAPI rendering_api = GetRenderingAPIForProcess()); +Class GetCoreAnimationLayerClassForRenderingAPI(IOSRenderingAPI rendering_api); } // namespace flutter +// Flutter supports Metal on all devices with Apple A7 SoC or above that have +// been updated to or past iOS 10.0. The processor was selected as it is the +// first version at which Metal was supported. The iOS version floor was +// selected due to the availability of features used by Skia. +// Support for Metal on simulators was added by Apple in the SDK for iOS 13. +#if TARGET_OS_SIMULATOR +#define METAL_IOS_VERSION_BASELINE 13.0 +#else +#define METAL_IOS_VERSION_BASELINE 10.0 +#endif // TARGET_OS_SIMULATOR + #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_RENDERING_API_SELECTION_H_ diff --git a/shell/platform/darwin/ios/rendering_api_selection.mm b/shell/platform/darwin/ios/rendering_api_selection.mm index 6ee84bcc6..2cf23bccc 100644 --- a/shell/platform/darwin/ios/rendering_api_selection.mm +++ b/shell/platform/darwin/ios/rendering_api_selection.mm @@ -10,6 +10,7 @@ #if FLUTTER_SHELL_ENABLE_METAL #include #endif // FLUTTER_SHELL_ENABLE_METAL +#import #include "flutter/fml/logging.h" @@ -17,11 +18,8 @@ namespace flutter { #if FLUTTER_SHELL_ENABLE_METAL bool ShouldUseMetalRenderer() { - // Flutter supports Metal on all devices with Apple A7 SoC or above that have been updated to or - // past iOS 10.0. The processor was selected as it is the first version at which Metal was - // supported. The iOS version floor was selected due to the availability of features used by Skia. bool ios_version_supports_metal = false; - if (@available(iOS 10.0, *)) { + if (@available(iOS METAL_IOS_VERSION_BASELINE, *)) { auto device = MTLCreateSystemDefaultDevice(); ios_version_supports_metal = [device supportsFeatureSet:MTLFeatureSet_iOS_GPUFamily1_v3]; } @@ -29,10 +27,17 @@ bool ShouldUseMetalRenderer() { } #endif // FLUTTER_SHELL_ENABLE_METAL -IOSRenderingAPI GetRenderingAPIForProcess() { -#if TARGET_IPHONE_SIMULATOR - return IOSRenderingAPI::kSoftware; -#endif // TARGET_IPHONE_SIMULATOR +IOSRenderingAPI GetRenderingAPIForProcess(bool force_software) { +#if TARGET_OS_SIMULATOR + if (force_software) { + return IOSRenderingAPI::kSoftware; + } +#else + if (force_software) { + FML_LOG(WARNING) << "The --enable-software-rendering is only supported on Simulator targets " + "and will be ignored."; + } +#endif // TARGET_OS_SIMULATOR #if FLUTTER_SHELL_ENABLE_METAL static bool should_use_metal = ShouldUseMetalRenderer(); @@ -40,7 +45,14 @@ IOSRenderingAPI GetRenderingAPIForProcess() { return IOSRenderingAPI::kMetal; } #endif // FLUTTER_SHELL_ENABLE_METAL + + // OpenGL will be emulated using software rendering by Apple on the simulator, so we use the + // Skia software rendering since it performs a little better than the emulated OpenGL. +#if TARGET_OS_SIMULATOR + return IOSRenderingAPI::kSoftware; +#else return IOSRenderingAPI::kOpenGLES; +#endif // TARGET_OS_SIMULATOR } Class GetCoreAnimationLayerClassForRenderingAPI(IOSRenderingAPI rendering_api) { @@ -49,10 +61,12 @@ Class GetCoreAnimationLayerClassForRenderingAPI(IOSRenderingAPI rendering_api) { return [CALayer class]; case IOSRenderingAPI::kOpenGLES: return [CAEAGLLayer class]; -#if !TARGET_IPHONE_SIMULATOR case IOSRenderingAPI::kMetal: - return [CAMetalLayer class]; -#endif // !TARGET_IPHONE_SIMULATOR + if (@available(iOS METAL_IOS_VERSION_BASELINE, *)) { + return [CAMetalLayer class]; + } + FML_CHECK(false) << "Metal availability should already have been checked"; + break; default: break; } diff --git a/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj b/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj index cc4462541..71d8cb57f 100644 --- a/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj +++ b/testing/scenario_app/ios/Scenarios/Scenarios.xcodeproj/project.pbxproj @@ -24,6 +24,7 @@ 242F37A222E636DE001E83D4 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4522E3B61000073EBF /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 242F37A322E636DE001E83D4 /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4122E3B5F700073EBF /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 244EA6D0230DBE8900B2D26E /* golden_platform_view_D21AP.png in Resources */ = {isa = PBXBuildFile; fileRef = 244EA6CF230DBE8900B2D26E /* golden_platform_view_D21AP.png */; }; + 246A6611252E693A00EAB0F3 /* RenderingSelectionTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 246A6610252E693A00EAB0F3 /* RenderingSelectionTest.m */; }; 246B4E4222E3B5F700073EBF /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4122E3B5F700073EBF /* App.framework */; }; 246B4E4622E3B61000073EBF /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 246B4E4522E3B61000073EBF /* Flutter.framework */; }; 248D76CC22E388370012F0C1 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 248D76CB22E388370012F0C1 /* AppDelegate.m */; }; @@ -126,6 +127,7 @@ 0D8470A3240F0B1F0030B565 /* StatusBarTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StatusBarTest.m; sourceTree = ""; }; 0DB781FC22EA2C0300E9B371 /* FlutterViewControllerTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FlutterViewControllerTest.m; sourceTree = ""; }; 244EA6CF230DBE8900B2D26E /* golden_platform_view_D21AP.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = golden_platform_view_D21AP.png; sourceTree = ""; }; + 246A6610252E693A00EAB0F3 /* RenderingSelectionTest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RenderingSelectionTest.m; sourceTree = ""; }; 246B4E4122E3B5F700073EBF /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = App.framework; sourceTree = ""; }; 246B4E4522E3B61000073EBF /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Flutter.framework; sourceTree = ""; }; 248D76C722E388370012F0C1 /* Scenarios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Scenarios.app; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -291,6 +293,7 @@ 0D8470A3240F0B1F0030B565 /* StatusBarTest.m */, 0A42BFB32447E179007E212E /* TextSemanticsFocusTest.m */, 0A42BFB52447E19F007E212E /* TextSemanticsFocusTest.h */, + 246A6610252E693A00EAB0F3 /* RenderingSelectionTest.m */, ); path = ScenariosUITests; sourceTree = ""; @@ -488,6 +491,7 @@ 6816DBA42318358200A51400 /* PlatformViewGoldenTestManager.m in Sources */, 248D76EF22E388380012F0C1 /* PlatformViewUITests.m in Sources */, 0D8470A4240F0B1F0030B565 /* StatusBarTest.m in Sources */, + 246A6611252E693A00EAB0F3 /* RenderingSelectionTest.m in Sources */, 4F06F1B32473296E000AF246 /* LocalizationInitializationTest.m in Sources */, 0A42BFB42447E179007E212E /* TextSemanticsFocusTest.m in Sources */, ); diff --git a/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m b/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m index b981938a0..96ddd0c73 100644 --- a/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m +++ b/testing/scenario_app/ios/Scenarios/Scenarios/AppDelegate.m @@ -50,7 +50,8 @@ @"--gesture-reject-eager" : @"platform_view_gesture_reject_eager", @"--gesture-accept" : @"platform_view_gesture_accept", @"--tap-status-bar" : @"tap_status_bar", - @"--text-semantics-focus" : @"text_semantics_focus" + @"--text-semantics-focus" : @"text_semantics_focus", + @"--animated-color-square" : @"animated_color_square", }; __block NSString* flutterViewControllerTestName = nil; [launchArgsMap @@ -119,6 +120,16 @@ gestureRecognizersBlockingPolicy: FlutterPlatformViewGestureRecognizersBlockingPolicyWaitUntilTouchesEnded]; self.window.rootViewController = flutterViewController; + + if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--assert-ca-layer-type"]) { + if ([[[NSProcessInfo processInfo] arguments] containsObject:@"--enable-software-rendering"]) { + NSAssert([flutterViewController.view.layer isKindOfClass:[CALayer class]], + @"Expected CALayer for software rendering."); + } else { + NSAssert([flutterViewController.view.layer isKindOfClass:[CAMetalLayer class]], + @"Expected CAMetalLayer for non-software rendering."); + } + } } @end diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.m index 78d65163b..29f1a472a 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/GoldenPlatformViewTests.m @@ -32,7 +32,7 @@ static const NSInteger kSecondsToWaitForPlatformView = 30; self.continueAfterFailure = NO; self.application = [[XCUIApplication alloc] init]; - self.application.launchArguments = @[ self.manager.launchArg ]; + self.application.launchArguments = @[ self.manager.launchArg, @"--enable-software-rendering" ]; [self.application launch]; } diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/PlatformViewGestureRecognizerTests.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/PlatformViewGestureRecognizerTests.m index 6771454c4..b37a0ad14 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/PlatformViewGestureRecognizerTests.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/PlatformViewGestureRecognizerTests.m @@ -18,7 +18,8 @@ static const NSInteger kSecondsToWaitForPlatformView = 30; - (void)testRejectPolicyUtilTouchesEnded { XCUIApplication* app = [[XCUIApplication alloc] init]; - app.launchArguments = @[ @"--gesture-reject-after-touches-ended" ]; + app.launchArguments = + @[ @"--gesture-reject-after-touches-ended", @"--enable-software-rendering" ]; [app launch]; NSPredicate* predicateToFindPlatformView = diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/RenderingSelectionTest.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/RenderingSelectionTest.m new file mode 100644 index 000000000..0f52816b6 --- /dev/null +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/RenderingSelectionTest.m @@ -0,0 +1,34 @@ +// Copyright 2020 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import +#import + +@interface RenderingSelectionTest : XCTestCase +@property(nonatomic, strong) XCUIApplication* application; +@end + +@implementation RenderingSelectionTest + +- (void)setUp { + [super setUp]; + self.continueAfterFailure = NO; + self.application = [[XCUIApplication alloc] init]; +} + +- (void)testSoftwareRendering { + self.application.launchArguments = + @[ @"--animated-color-square", @"--assert-ca-layer-type", @"--enable-software-rendering" ]; + [self.application launch]; + + // App asserts that the rendering API is CALayer +} + +- (void)testMetalRendering { + self.application.launchArguments = @[ @"--animated-color-square", @"--assert-ca-layer-type" ]; + [self.application launch]; + + // App asserts that the rendering API is CAMetalLayer +} +@end diff --git a/testing/scenario_app/ios/Scenarios/ScenariosUITests/UnobstructedPlatformViewTests.m b/testing/scenario_app/ios/Scenarios/ScenariosUITests/UnobstructedPlatformViewTests.m index 73186b0ba..fa335a338 100644 --- a/testing/scenario_app/ios/Scenarios/ScenariosUITests/UnobstructedPlatformViewTests.m +++ b/testing/scenario_app/ios/Scenarios/ScenariosUITests/UnobstructedPlatformViewTests.m @@ -21,7 +21,8 @@ // +---+ - (void)testNoOverlay { XCUIApplication* app = [[XCUIApplication alloc] init]; - app.launchArguments = @[ @"--platform-view-no-overlay-intersection" ]; + app.launchArguments = + @[ @"--platform-view-no-overlay-intersection", @"--enable-software-rendering" ]; [app launch]; XCUIElement* platform_view = app.textViews[@"platform_view[0]"]; diff --git a/tools/gn b/tools/gn index dd2dedbd0..c0ecc2bf4 100755 --- a/tools/gn +++ b/tools/gn @@ -222,8 +222,8 @@ def to_gn_args(args): gn_args['use_goma'] = False gn_args['goma_dir'] = None - # Enable Metal on non-simulator iOS builds. - if args.target_os == 'ios' and not args.simulator: + # Enable Metal on iOS builds. + if args.target_os == 'ios': gn_args['skia_use_metal'] = True gn_args['shell_enable_metal'] = True # Bitcode enabled builds using the current version of the toolchain leak -- GitLab