gpu.gni 1.1 KB
Newer Older
M
Michael Goderbauer 已提交
1
# Copyright 2013 The Flutter Authors. All rights reserved.
2 3 4
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

5
import("//flutter/shell/config.gni")
6 7 8 9 10 11 12 13

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.")
14 15
  assert(defined(invoker.enable_metal),
         "Caller must declare if the Metal backend must be enabled.")
16

17 18
  group(target_name) {
    public_deps = []
19 20

    if (invoker.enable_software) {
21
      public_deps += [ "//flutter/shell/gpu:gpu_surface_software" ]
22 23 24
    }

    if (invoker.enable_gl) {
25
      public_deps += [ "//flutter/shell/gpu:gpu_surface_gl" ]
26 27 28
    }

    if (invoker.enable_vulkan) {
29
      public_deps += [ "//flutter/shell/gpu:gpu_surface_vulkan" ]
30
    }
31 32

    if (invoker.enable_metal) {
33
      public_deps += [ "//flutter/shell/gpu:gpu_surface_metal" ]
34
    }
35 36
  }
}