[Impeller] Remove unused GN flags. (flutter/engine#52962)
Removes impeller_capture, impeller_use_prebuilt_impellerc, impeller_use_prebuilt_scenec, and impeller_trace_canvas. Also removes setting these flags from ./flutter/tools/gn.
This commit is contained in:
@@ -9,9 +9,6 @@ declare_args() {
|
||||
impeller_debug =
|
||||
flutter_runtime_mode == "debug" || flutter_runtime_mode == "profile"
|
||||
|
||||
# Whether the runtime capture/playback system is enabled.
|
||||
impeller_capture = flutter_runtime_mode == "debug"
|
||||
|
||||
# Whether the Metal backend is enabled.
|
||||
impeller_enable_metal = (is_mac || is_ios) && target_os != "fuchsia"
|
||||
|
||||
@@ -23,25 +20,12 @@ declare_args() {
|
||||
impeller_enable_vulkan = (is_linux || is_win || is_android || is_mac ||
|
||||
enable_unittests) && target_os != "fuchsia"
|
||||
|
||||
# Whether to use a prebuilt impellerc.
|
||||
# If this is the empty string, impellerc will be built.
|
||||
# If it is non-empty, it should be the absolute path to impellerc.
|
||||
impeller_use_prebuilt_impellerc = ""
|
||||
|
||||
# Whether to use a prebuilt scenec.
|
||||
# If this is the empty string, scenec will be built.
|
||||
# If it is non-empty, it should be the absolute path to scenec.
|
||||
impeller_use_prebuilt_scenec = ""
|
||||
|
||||
# If enabled, all OpenGL calls will be traced. Because additional trace
|
||||
# overhead may be substantial, this is not enabled by default.
|
||||
impeller_trace_all_gl_calls = false
|
||||
|
||||
# Enable experimental 3D scene rendering.
|
||||
impeller_enable_3d = false
|
||||
|
||||
# Enable to get trace statements for canvas usage.
|
||||
impeller_trace_canvas = false
|
||||
}
|
||||
|
||||
# Arguments that are combinations of other arguments by default but which can
|
||||
|
||||
@@ -14,34 +14,14 @@ import("//flutter/impeller/tools/args.gni")
|
||||
# invoked once via `compiled_action` or `action`.
|
||||
template("_impellerc") {
|
||||
if (invoker.single_invocation) {
|
||||
if (impeller_use_prebuilt_impellerc == "") {
|
||||
compiled_action(target_name) {
|
||||
forward_variables_from(invoker, "*")
|
||||
tool = "//flutter/impeller/compiler:impellerc"
|
||||
}
|
||||
} else {
|
||||
action(target_name) {
|
||||
forward_variables_from(invoker, "*", [ "args" ])
|
||||
script = "//build/gn_run_binary.py"
|
||||
impellerc_path =
|
||||
rebase_path(impeller_use_prebuilt_impellerc, root_build_dir)
|
||||
args = [ impellerc_path ] + invoker.args
|
||||
}
|
||||
compiled_action(target_name) {
|
||||
forward_variables_from(invoker, "*")
|
||||
tool = "//flutter/impeller/compiler:impellerc"
|
||||
}
|
||||
} else {
|
||||
if (impeller_use_prebuilt_impellerc == "") {
|
||||
compiled_action_foreach(target_name) {
|
||||
forward_variables_from(invoker, "*")
|
||||
tool = "//flutter/impeller/compiler:impellerc"
|
||||
}
|
||||
} else {
|
||||
action_foreach(target_name) {
|
||||
forward_variables_from(invoker, "*", [ "args" ])
|
||||
script = "//build/gn_run_binary.py"
|
||||
impellerc_path =
|
||||
rebase_path(impeller_use_prebuilt_impellerc, root_build_dir)
|
||||
args = [ impellerc_path ] + invoker.args
|
||||
}
|
||||
compiled_action_foreach(target_name) {
|
||||
forward_variables_from(invoker, "*")
|
||||
tool = "//flutter/impeller/compiler:impellerc"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,42 +1,27 @@
|
||||
# Dispatches to the build or prebuilt scenec depending on the value of
|
||||
# the impeller_use_prebuilt_scenec argument. Forwards all variables to
|
||||
# compiled_action_foreach or action_foreach as appropriate.
|
||||
# Copyright 2013 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("//build/compiled_action.gni")
|
||||
import("//flutter/impeller/tools/args.gni")
|
||||
|
||||
template("_scenec") {
|
||||
if (impeller_use_prebuilt_scenec == "") {
|
||||
compiled_action_foreach(target_name) {
|
||||
forward_variables_from(invoker, "*")
|
||||
tool = "//flutter/impeller/scene/importer:scenec"
|
||||
}
|
||||
} else {
|
||||
action_foreach(target_name) {
|
||||
forward_variables_from(invoker, "*", [ "args" ])
|
||||
script = "//build/gn_run_binary.py"
|
||||
scenec_path = rebase_path(impeller_use_prebuilt_scenec, root_build_dir)
|
||||
args = [ scenec_path ] + invoker.args
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template("scenec") {
|
||||
assert(defined(invoker.geometry), "Geometry input files must be specified.")
|
||||
assert(defined(invoker.type),
|
||||
"The type of geometry to be parsed (gltf, etc..).")
|
||||
|
||||
_scenec(target_name) {
|
||||
sources = invoker.geometry
|
||||
generated_dir = "$target_gen_dir"
|
||||
compiled_action_foreach(target_name) {
|
||||
tool = "//flutter/impeller/scene/importer:scenec"
|
||||
|
||||
sources = invoker.geometry
|
||||
input_type = invoker.type
|
||||
|
||||
args = [
|
||||
"--input={{source}}",
|
||||
"--input-type=$input_type",
|
||||
]
|
||||
|
||||
output = "$generated_dir/{{source_file_part}}.ipscene"
|
||||
output = "$target_gen_dir/{{source_file_part}}.ipscene"
|
||||
output_path = rebase_path(output, root_build_dir)
|
||||
|
||||
args += [ "--output=$output_path" ]
|
||||
|
||||
@@ -719,12 +719,6 @@ def to_gn_args(args):
|
||||
if args.enable_impeller_3d:
|
||||
gn_args['impeller_enable_3d'] = True
|
||||
|
||||
if args.enable_impeller_trace_canvas:
|
||||
gn_args['impeller_trace_canvas'] = True
|
||||
|
||||
if args.prebuilt_impellerc is not None:
|
||||
gn_args['impeller_use_prebuilt_impellerc'] = args.prebuilt_impellerc
|
||||
|
||||
malioc_path = args.malioc_path
|
||||
if not malioc_path:
|
||||
malioc_path = os.environ.get('MALIOC_PATH')
|
||||
@@ -1162,14 +1156,6 @@ def parse_args(args):
|
||||
)
|
||||
|
||||
# Impeller flags.
|
||||
parser.add_argument(
|
||||
'--prebuilt-impellerc',
|
||||
default=None,
|
||||
type=str,
|
||||
help='Absolute path to a prebuilt impellerc. ' +
|
||||
'Do not use this outside of CI or with impellerc from a different engine version.'
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'--enable-impeller-3d',
|
||||
default=False,
|
||||
@@ -1177,12 +1163,6 @@ def parse_args(args):
|
||||
help='Enables experimental 3d support.'
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'--enable-impeller-trace-canvas',
|
||||
default=False,
|
||||
action='store_true',
|
||||
help='Enables tracing calls to Canvas.'
|
||||
)
|
||||
parser.add_argument('--malioc-path', type=str, help='The path to the malioc tool.')
|
||||
|
||||
parser.add_argument(
|
||||
|
||||
Reference in New Issue
Block a user