From aac27e52b32ac6d55a3f9911a7c9aa756e16408a Mon Sep 17 00:00:00 2001 From: Chinmay Garde Date: Mon, 6 Mar 2017 14:49:25 -0800 Subject: [PATCH] Use software rendering on iOS simulators without needing a flag. (flutter/engine#3465) --- engine/src/flutter/common/settings.h | 1 - engine/src/flutter/shell/common/shell.cc | 3 --- engine/src/flutter/shell/common/switches.h | 4 ---- .../shell/platform/darwin/ios/framework/Source/FlutterView.mm | 3 +-- 4 files changed, 1 insertion(+), 10 deletions(-) diff --git a/engine/src/flutter/common/settings.h b/engine/src/flutter/common/settings.h index e4eeb278e3..201fdb8acc 100644 --- a/engine/src/flutter/common/settings.h +++ b/engine/src/flutter/common/settings.h @@ -25,7 +25,6 @@ struct Settings { bool enable_dart_profiling = false; bool use_test_fonts = false; bool dart_non_checked_mode = false; - bool force_software_rendering = false; std::string aot_snapshot_path; std::string aot_vm_snapshot_data_filename; std::string aot_vm_snapshot_instr_filename; diff --git a/engine/src/flutter/shell/common/shell.cc b/engine/src/flutter/shell/common/shell.cc index 5e3f1968ca..8f894f071c 100644 --- a/engine/src/flutter/shell/common/shell.cc +++ b/engine/src/flutter/shell/common/shell.cc @@ -185,9 +185,6 @@ void Shell::InitStandalone(std::string icu_data_path, settings.trace_startup = command_line.HasSwitch(FlagForSwitch(Switch::TraceStartup)); - settings.force_software_rendering = - command_line.HasSwitch(FlagForSwitch(Switch::ForceSoftwareRendering)); - settings.aot_snapshot_path = command_line.GetSwitchValueASCII(FlagForSwitch(Switch::AotSnapshotPath)); settings.aot_vm_snapshot_data_filename = command_line.GetSwitchValueASCII( diff --git a/engine/src/flutter/shell/common/switches.h b/engine/src/flutter/shell/common/switches.h index 552b8c3a51..4ced30821c 100644 --- a/engine/src/flutter/shell/common/switches.h +++ b/engine/src/flutter/shell/common/switches.h @@ -93,10 +93,6 @@ DEF_SWITCH(DartNonCheckedMode, "precompiled and checked mode is unsupported. However, this flag " "may be specified if the user wishes to run in the debug product " "mode (i.e. with JIT or DBC) with checked mode off.") -DEF_SWITCH(ForceSoftwareRendering, - "force-software-rendering", - "On platforms where it is supported (only iOS simulator currently), " - "the shell will attempt to use the software backend for rendering.") DEF_SWITCHES_END void PrintUsage(const std::string& executable_name); diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterView.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterView.mm index b6f2f8ef53..079c901885 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterView.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterView.mm @@ -33,8 +33,7 @@ + (Class)layerClass { #if TARGET_IPHONE_SIMULATOR - return blink::Settings::Get().force_software_rendering ? [CALayer class] - : [CAEAGLLayer class]; + return [CALayer class]; #else // TARGET_IPHONE_SIMULATOR return [CAEAGLLayer class]; #endif // TARGET_IPHONE_SIMULATOR