OLD | NEW |
| (Empty) |
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 | |
3 # found in the LICENSE file. | |
4 | |
5 import("//testing/test.gni") | |
6 import("//build/config/ui.gni") | |
7 if (is_mac) { | |
8 import("//build/config/mac/mac_sdk.gni") | |
9 } | |
10 | |
11 group("service") { | |
12 if (is_component_build) { | |
13 public_deps = [ | |
14 "//gpu", | |
15 ] | |
16 } else { | |
17 public_deps = [ | |
18 ":ipc_service_sources", | |
19 ] | |
20 } | |
21 } | |
22 | |
23 source_set("ipc_service_sources") { | |
24 visibility = [ "//gpu/*" ] | |
25 sources = [ | |
26 "gpu_channel.cc", | |
27 "gpu_channel.h", | |
28 "gpu_channel_manager.cc", | |
29 "gpu_channel_manager.h", | |
30 "gpu_channel_manager_delegate.h", | |
31 "gpu_command_buffer_stub.cc", | |
32 "gpu_command_buffer_stub.h", | |
33 "gpu_config.h", | |
34 "gpu_memory_buffer_factory.cc", | |
35 "gpu_memory_buffer_factory.h", | |
36 "gpu_memory_manager.cc", | |
37 "gpu_memory_manager.h", | |
38 "gpu_memory_tracking.cc", | |
39 "gpu_memory_tracking.h", | |
40 "gpu_watchdog.h", | |
41 "image_transport_surface.h", | |
42 "pass_through_image_transport_surface.cc", | |
43 "pass_through_image_transport_surface.h", | |
44 ] | |
45 configs += [ "//gpu:gpu_implementation" ] | |
46 public_deps = [ | |
47 "//base", | |
48 "//gpu/command_buffer/common:common_sources", | |
49 "//gpu/command_buffer/service:service_sources", | |
50 "//gpu/ipc/common:ipc_common_sources", | |
51 "//ipc", | |
52 "//ui/events:events_base", | |
53 "//ui/gfx", | |
54 "//ui/gfx/geometry", | |
55 "//ui/gl", | |
56 "//url", | |
57 ] | |
58 deps = [] | |
59 libs = [] | |
60 if (is_win) { | |
61 sources += [ | |
62 "child_window_surface_win.cc", | |
63 "child_window_surface_win.h", | |
64 "image_transport_surface_win.cc", | |
65 ] | |
66 } | |
67 if (is_mac) { | |
68 sources += [ | |
69 "ca_layer_partial_damage_tree_mac.h", | |
70 "ca_layer_partial_damage_tree_mac.mm", | |
71 "ca_layer_tree_mac.h", | |
72 "ca_layer_tree_mac.mm", | |
73 "gpu_memory_buffer_factory_io_surface.cc", | |
74 "gpu_memory_buffer_factory_io_surface.h", | |
75 "image_transport_surface_mac.mm", | |
76 "image_transport_surface_overlay_mac.h", | |
77 "image_transport_surface_overlay_mac.mm", | |
78 ] | |
79 deps += [ | |
80 "//skia", | |
81 "//ui/accelerated_widget_mac", | |
82 ] | |
83 lib_dirs = [ "$mac_sdk_path/usr/lib" ] | |
84 libs += [ | |
85 "AVFoundation.framework", | |
86 "CoreMedia.framework", | |
87 ] | |
88 } | |
89 if (is_android) { | |
90 sources += [ | |
91 "gpu_memory_buffer_factory_surface_texture.cc", | |
92 "gpu_memory_buffer_factory_surface_texture.h", | |
93 "image_transport_surface_android.cc", | |
94 "stream_texture_android.cc", | |
95 "stream_texture_android.h", | |
96 ] | |
97 libs += [ "android" ] | |
98 } | |
99 if (is_linux) { | |
100 sources += [ "image_transport_surface_linux.cc" ] | |
101 } | |
102 if (use_x11) { | |
103 sources += [ "x_util.h" ] | |
104 } | |
105 if (use_ozone) { | |
106 sources += [ | |
107 "gpu_memory_buffer_factory_ozone_native_pixmap.cc", | |
108 "gpu_memory_buffer_factory_ozone_native_pixmap.h", | |
109 ] | |
110 deps += [ "//ui/ozone" ] | |
111 } | |
112 } | |
113 | |
114 source_set("test_support") { | |
115 testonly = true | |
116 sources = [ | |
117 "gpu_memory_buffer_factory_test_template.h", | |
118 ] | |
119 public_deps = [ | |
120 ":ipc_service_sources", | |
121 "//testing/gtest:gtest", | |
122 ] | |
123 } | |
124 | |
125 test("gpu_ipc_service_unittests") { | |
126 configs += [ "//build/config:precompiled_headers" ] | |
127 sources = [ | |
128 "gpu_channel_manager_unittest.cc", | |
129 "gpu_channel_test_common.cc", | |
130 "gpu_channel_test_common.h", | |
131 "gpu_channel_unittest.cc", | |
132 ] | |
133 deps = [ | |
134 ":ipc_service_sources", | |
135 ":test_support", | |
136 "//base", | |
137 "//base/test:run_all_unittests", | |
138 "//base/test:test_support", | |
139 "//ipc:test_support", | |
140 "//testing/gtest", | |
141 "//ui/gfx:test_support", | |
142 ] | |
143 libs = [] | |
144 if (is_android) { | |
145 sources += [ "gpu_memory_buffer_factory_surface_texture_unittest.cc" ] | |
146 } | |
147 if (is_mac) { | |
148 sources += [ | |
149 "ca_layer_tree_unittest_mac.mm", | |
150 "gpu_memory_buffer_factory_io_surface_unittest.cc", | |
151 ] | |
152 deps += [ "//ui/accelerated_widget_mac" ] | |
153 libs += [ | |
154 "AVFoundation.framework", | |
155 "CoreMedia.framework", | |
156 ] | |
157 } | |
158 if (use_ozone) { | |
159 sources += [ "gpu_memory_buffer_factory_ozone_native_pixmap_unittest.cc" ] | |
160 deps += [ "//ui/ozone" ] | |
161 } | |
162 } | |
OLD | NEW |