2018-11-07 12:24:35 -08:00
|
|
|
# Copyright 2013 The Flutter Authors. All rights reserved.
|
2018-05-25 14:31:01 -07:00
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
|
|
import("$flutter_root/shell/config.gni")
|
|
|
|
|
|
|
|
|
|
template("shell_gpu_configuration") {
|
|
|
|
|
assert(defined(invoker.enable_software),
|
|
|
|
|
"Caller must declare if the Software backend must be enabled.")
|
|
|
|
|
assert(defined(invoker.enable_vulkan),
|
|
|
|
|
"Caller must declare if the Vulkan backend must be enabled.")
|
|
|
|
|
assert(defined(invoker.enable_gl),
|
|
|
|
|
"Caller must declare if the Open GL backend must be enabled.")
|
2019-05-11 15:21:26 -07:00
|
|
|
assert(defined(invoker.enable_metal),
|
|
|
|
|
"Caller must declare if the Metal backend must be enabled.")
|
2018-05-25 14:31:01 -07:00
|
|
|
|
2018-10-16 14:30:19 -07:00
|
|
|
group(target_name) {
|
|
|
|
|
public_deps = []
|
2018-05-25 14:31:01 -07:00
|
|
|
|
|
|
|
|
if (invoker.enable_software) {
|
2018-10-16 14:30:19 -07:00
|
|
|
public_deps += [ "$flutter_root/shell/gpu:gpu_surface_software" ]
|
2018-05-25 14:31:01 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (invoker.enable_gl) {
|
2018-10-16 14:30:19 -07:00
|
|
|
public_deps += [ "$flutter_root/shell/gpu:gpu_surface_gl" ]
|
2018-05-25 14:31:01 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (invoker.enable_vulkan) {
|
2018-10-16 14:30:19 -07:00
|
|
|
public_deps += [ "$flutter_root/shell/gpu:gpu_surface_vulkan" ]
|
2018-05-25 14:31:01 -07:00
|
|
|
}
|
2019-05-11 15:21:26 -07:00
|
|
|
|
|
|
|
|
if (invoker.enable_metal) {
|
|
|
|
|
public_deps += [ "$flutter_root/shell/gpu:gpu_surface_metal" ]
|
|
|
|
|
}
|
2018-05-25 14:31:01 -07:00
|
|
|
}
|
|
|
|
|
}
|