OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/ui.gni") | 5 import("//build/config/ui.gni") |
6 | 6 |
7 config("vulkan_config") { | 7 config("vulkan_config") { |
8 defines = [ "ENABLE_VULKAN" ] | 8 defines = [ "ENABLE_VULKAN" ] |
9 if (use_x11) { | 9 if (use_x11) { |
10 defines += [ "VK_USE_PLATFORM_XLIB_KHR" ] | 10 defines += [ "VK_USE_PLATFORM_XLIB_KHR" ] |
11 } | 11 } |
12 } | 12 } |
13 | 13 |
14 component("vulkan") { | 14 component("vulkan") { |
15 output_name = "vulkan_wrapper" | 15 output_name = "vulkan_wrapper" |
16 | 16 |
17 if (is_linux && enable_vulkan) { | 17 if (is_linux && enable_vulkan) { |
18 assert(use_x11, "Vulkan only support x11 at this point.") | 18 assert(use_x11, "Vulkan only support x11 at this point.") |
19 sources = [ | 19 sources = [ |
| 20 "vulkan_command_buffer.cc", |
| 21 "vulkan_command_buffer.h", |
20 "vulkan_export.h", | 22 "vulkan_export.h", |
21 "vulkan_implementation.cc", | 23 "vulkan_implementation.cc", |
22 "vulkan_implementation.h", | 24 "vulkan_implementation.h", |
23 "vulkan_surface.cc", | 25 "vulkan_surface.cc", |
24 "vulkan_surface.h", | 26 "vulkan_surface.h", |
| 27 "vulkan_swap_chain.cc", |
| 28 "vulkan_swap_chain.h", |
25 ] | 29 ] |
26 | 30 |
27 configs += [ "//build/config:precompiled_headers" ] | 31 configs += [ "//build/config:precompiled_headers" ] |
28 defines = [ "VULKAN_IMPLEMENTATION" ] | 32 defines = [ "VULKAN_IMPLEMENTATION" ] |
29 | 33 |
30 all_dependent_configs = [ ":vulkan_config" ] | 34 all_dependent_configs = [ ":vulkan_config" ] |
31 libs = [ "vulkan" ] | 35 libs = [ "vulkan" ] |
32 | 36 |
33 include_dirs = [ "/usr/include" ] | 37 include_dirs = [ "/usr/include" ] |
34 if (target_cpu == "x64") { | 38 if (target_cpu == "x64") { |
35 lib_dirs = [ "/usr/lib/x86_64-linux-gnu" ] | 39 lib_dirs = [ "/usr/lib/x86_64-linux-gnu" ] |
36 } else { | 40 } else { |
37 assert(false, "Unsupported vulkan target: " + target_cpu) | 41 assert(false, "Unsupported vulkan target: " + target_cpu) |
38 } | 42 } |
39 | 43 |
40 deps = [ | 44 deps = [ |
41 "//base", | 45 "//base", |
42 "//ui/base", | 46 "//ui/base", |
43 "//ui/gfx", | 47 "//ui/gfx", |
44 ] | 48 ] |
45 | 49 |
46 if (use_x11) { | 50 if (use_x11) { |
47 deps += [ "//ui/gfx/x" ] | 51 deps += [ "//ui/gfx/x" ] |
48 configs += [ "//build/config/linux:x11" ] | 52 configs += [ "//build/config/linux:x11" ] |
49 } | 53 } |
50 } | 54 } |
51 } | 55 } |
OLD | NEW |