Vectorize website settings icons in omnibox
[chromium-blink-merge.git] / gpu / BUILD.gn
blobcf993771214fe341fbe0762c2fc6d3d7e6c076f6
1 # Copyright 2014 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.
5 # GYP-to-GN project mappings:
7 #  gpu.gyp:command_buffer_client => //gpu/command_buffer/client
9 #  gpu.gyp:command_buffer_common => //gpu/command_buffer/common
11 #  gpu.gyp:command_buffer_service => //gpu/command_buffer/service
13 #  gpu/gpu.gyp:gl_in_process_context =>
14 #      //gpu/command_buffer/client:gl_in_process_context
16 #  gpu.gyp:gles2_cmd_helper => //gpu/command_buffer/client:gles2_cmd_helper
18 #  gpu.gyp:gles2_c_lib => //gpu/command_buffer/client:gles2_c_lib
20 #  gpu.gyp:gles2_implementation =>
21 #      //gpu/command_buffer/client:gles2_implementation
23 #  gpu.gyp:gpu_config => //gpu/config
25 #  gpu.gyp:gpu_ipc => //gpu/ipc
27 #  gpu.gyp:disk_cache_proto => //gpu/command_buffer/service:disk_cache_proto
29 #  command_buffer/command_buffer.gyp:gles2_utils =>
30 #     //gpu/command_buffer/common:gles2_utils
32 # gpu/skia_bindings/skia_bindings.gyp:gpu_skia_bindings => //gpu/skia_bindings
34 import("//testing/test.gni")
35 import("//build/config/ui.gni")
37 config("gpu_implementation") {
38   defines = [ "GPU_IMPLEMENTATION" ]
41 component("gpu") {
42   public_deps = [
43     "//gpu/command_buffer/client:client_sources",
44     "//gpu/command_buffer/client:gles2_cmd_helper_sources",
45     "//gpu/command_buffer/common:common_sources",
46     "//gpu/command_buffer/service:service_sources",
47     "//gpu/config:config_sources",
48     "//gpu/ipc:ipc_sources",
49   ]
52 source_set("test_support") {
53   testonly = true
54   sources = [
55     "command_buffer/client/gles2_interface_stub.cc",
56     "command_buffer/client/gles2_interface_stub.h",
57     "command_buffer/service/error_state_mock.cc",
58     "command_buffer/service/gles2_cmd_decoder_mock.cc",
59   ]
61   public_deps = [
62     ":gpu",
63     "//gpu/command_buffer/client:gles2_interface",
64   ]
65   deps = [
66     "//testing/gmock",
67     "//testing/gtest",
68     "//ui/gl:gl_unittest_utils",
69   ]
72 group("gl_tests_run") {
73   testonly = true
74   deps = [
75     ":gl_tests",
76   ]
79 test("gl_tests") {
80   sources = [
81     "command_buffer/tests/compressed_texture_test.cc",
82     "command_buffer/tests/gl_bind_uniform_location_unittest.cc",
83     "command_buffer/tests/gl_chromium_framebuffer_multisample_unittest.cc",
84     "command_buffer/tests/gl_chromium_path_rendering_unittest.cc",
85     "command_buffer/tests/gl_clear_framebuffer_unittest.cc",
86     "command_buffer/tests/gl_compressed_copy_texture_CHROMIUM_unittest.cc",
87     "command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc",
88     "command_buffer/tests/gl_depth_texture_unittest.cc",
89     "command_buffer/tests/gl_gpu_memory_buffer_unittest.cc",
90     "command_buffer/tests/gl_lose_context_chromium_unittest.cc",
91     "command_buffer/tests/gl_manager.cc",
92     "command_buffer/tests/gl_manager.h",
93     "command_buffer/tests/gl_pointcoord_unittest.cc",
94     "command_buffer/tests/gl_program_unittest.cc",
95     "command_buffer/tests/gl_query_unittest.cc",
96     "command_buffer/tests/gl_readback_unittest.cc",
97     "command_buffer/tests/gl_shared_resources_unittest.cc",
98     "command_buffer/tests/gl_stream_draw_unittest.cc",
99     "command_buffer/tests/gl_test_utils.cc",
100     "command_buffer/tests/gl_test_utils.h",
101     "command_buffer/tests/gl_tests_main.cc",
102     "command_buffer/tests/gl_texture_mailbox_unittest.cc",
103     "command_buffer/tests/gl_texture_storage_unittest.cc",
104     "command_buffer/tests/gl_unittest.cc",
105     "command_buffer/tests/gl_unittests_android.cc",
106     "command_buffer/tests/gl_virtual_contexts_unittest.cc",
107     "command_buffer/tests/occlusion_query_unittest.cc",
108   ]
110   defines = [ "GL_GLEXT_PROTOTYPES" ]
112   configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
114   deps = [
115     ":gpu",
116     ":test_support",
117     "//base",
118     "//base/test:test_support",
119     "//base/third_party/dynamic_annotations",
120     "//testing/gmock",
121     "//testing/gtest",
122     "//third_party/angle:translator",
123     "//ui/gfx",
124     "//ui/gfx:test_support",
125     "//ui/gfx/geometry",
126     "//ui/gl",
127     "//gpu/command_buffer/common:gles2_utils",
128     "//gpu/command_buffer/client:gles2_c_lib",
129     "//gpu/command_buffer/client:gles2_implementation",
130   ]
132   libs = []
134   if (is_android) {
135     deps += [ "//testing/android/native_test:native_test_native_code" ]
136     libs += [ "android" ]
137   }
140 # TODO(GYP): Delete this after we've converted everything to GN.
141 # The _run targets exist only for compatibility w/ GYP.
142 group("gpu_unittests_run") {
143   testonly = true
144   deps = [
145     ":gpu_unittests",
146   ]
149 test("gpu_unittests") {
150   sources = [
151     "command_buffer/client/buffer_tracker_unittest.cc",
152     "command_buffer/client/client_test_helper.cc",
153     "command_buffer/client/client_test_helper.h",
154     "command_buffer/client/cmd_buffer_helper_test.cc",
155     "command_buffer/client/fenced_allocator_test.cc",
156     "command_buffer/client/gles2_implementation_unittest.cc",
157     "command_buffer/client/mapped_memory_unittest.cc",
158     "command_buffer/client/program_info_manager_unittest.cc",
159     "command_buffer/client/query_tracker_unittest.cc",
160     "command_buffer/client/ring_buffer_test.cc",
161     "command_buffer/client/transfer_buffer_unittest.cc",
162     "command_buffer/client/vertex_array_object_manager_unittest.cc",
163     "command_buffer/common/bitfield_helpers_test.cc",
164     "command_buffer/common/command_buffer_mock.cc",
165     "command_buffer/common/command_buffer_mock.h",
166     "command_buffer/common/command_buffer_shared_test.cc",
167     "command_buffer/common/debug_marker_manager_unittest.cc",
168     "command_buffer/common/gles2_cmd_format_test.cc",
169     "command_buffer/common/gles2_cmd_format_test_autogen.h",
170     "command_buffer/common/gles2_cmd_utils_unittest.cc",
171     "command_buffer/common/id_allocator_test.cc",
172     "command_buffer/common/trace_event.h",
173     "command_buffer/common/unittest_main.cc",
174     "command_buffer/service/buffer_manager_unittest.cc",
175     "command_buffer/service/cmd_parser_test.cc",
176     "command_buffer/service/command_buffer_service_unittest.cc",
177     "command_buffer/service/common_decoder_unittest.cc",
178     "command_buffer/service/context_group_unittest.cc",
179     "command_buffer/service/context_state_unittest.cc",
180     "command_buffer/service/feature_info_unittest.cc",
181     "command_buffer/service/framebuffer_manager_unittest.cc",
182     "command_buffer/service/gl_context_mock.cc",
183     "command_buffer/service/gl_context_mock.h",
184     "command_buffer/service/gl_surface_mock.cc",
185     "command_buffer/service/gl_surface_mock.h",
186     "command_buffer/service/gles2_cmd_decoder_unittest.cc",
187     "command_buffer/service/gles2_cmd_decoder_unittest.h",
188     "command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h",
189     "command_buffer/service/gles2_cmd_decoder_unittest_1.cc",
190     "command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h",
191     "command_buffer/service/gles2_cmd_decoder_unittest_2.cc",
192     "command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h",
193     "command_buffer/service/gles2_cmd_decoder_unittest_3.cc",
194     "command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h",
195     "command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc",
196     "command_buffer/service/gles2_cmd_decoder_unittest_base.cc",
197     "command_buffer/service/gles2_cmd_decoder_unittest_base.h",
198     "command_buffer/service/gles2_cmd_decoder_unittest_buffers.cc",
199     "command_buffer/service/gles2_cmd_decoder_unittest_context_lost.cc",
200     "command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc",
201     "command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc",
202     "command_buffer/service/gles2_cmd_decoder_unittest_extensions.cc",
203     "command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc",
204     "command_buffer/service/gles2_cmd_decoder_unittest_programs.cc",
205     "command_buffer/service/gles2_cmd_decoder_unittest_textures.cc",
206     "command_buffer/service/gles2_cmd_decoder_unittest_valuebuffer.cc",
207     "command_buffer/service/gpu_scheduler_unittest.cc",
208     "command_buffer/service/gpu_service_test.cc",
209     "command_buffer/service/gpu_service_test.h",
210     "command_buffer/service/gpu_tracer_unittest.cc",
211     "command_buffer/service/id_manager_unittest.cc",
212     "command_buffer/service/mailbox_manager_unittest.cc",
213     "command_buffer/service/memory_program_cache_unittest.cc",
214     "command_buffer/service/mocks.cc",
215     "command_buffer/service/mocks.h",
216     "command_buffer/service/path_manager_unittest.cc",
217     "command_buffer/service/program_cache_unittest.cc",
218     "command_buffer/service/program_manager_unittest.cc",
219     "command_buffer/service/query_manager_unittest.cc",
220     "command_buffer/service/renderbuffer_manager_unittest.cc",
221     "command_buffer/service/shader_manager_unittest.cc",
222     "command_buffer/service/shader_translator_cache_unittest.cc",
223     "command_buffer/service/shader_translator_unittest.cc",
224     "command_buffer/service/test_helper.cc",
225     "command_buffer/service/test_helper.h",
226     "command_buffer/service/texture_manager_unittest.cc",
227     "command_buffer/service/transfer_buffer_manager_unittest.cc",
228     "command_buffer/service/valuebuffer_manager_unittest.cc",
229     "command_buffer/service/vertex_array_manager_unittest.cc",
230     "command_buffer/service/vertex_attrib_manager_unittest.cc",
231     "config/gpu_blacklist_unittest.cc",
232     "config/gpu_control_list_entry_unittest.cc",
233     "config/gpu_control_list_number_info_unittest.cc",
234     "config/gpu_control_list_os_info_unittest.cc",
235     "config/gpu_control_list_unittest.cc",
236     "config/gpu_control_list_version_info_unittest.cc",
237     "config/gpu_driver_bug_list_unittest.cc",
238     "config/gpu_info_collector_unittest.cc",
239     "config/gpu_info_unittest.cc",
240     "config/gpu_test_config_unittest.cc",
241     "config/gpu_test_expectations_parser_unittest.cc",
242     "config/gpu_util_unittest.cc",
243   ]
245   configs += [
246     "//build/config:precompiled_headers",
248     # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
249     "//build/config/compiler:no_size_t_to_int_warning",
250   ]
252   deps = [
253     ":gpu",
254     ":test_support",
255     "//base",
256     "//base/test:test_support",
257     "//base/third_party/dynamic_annotations",
258     "//testing/gmock",
259     "//testing/gtest",
260     "//third_party/angle:translator",
261     "//ui/gfx",
262     "//ui/gfx/geometry",
263     "//ui/gfx:test_support",
264     "//ui/gl",
265     "//ui/gl:gl_unittest_utils",
266     "//ui/gl:test_support",
267     "//gpu/command_buffer/common:gles2_utils",
268     "//gpu/command_buffer/client:gles2_c_lib",
269     "//gpu/command_buffer/client:gles2_implementation",
270   ]
273 test("gpu_perftests") {
274   sources = [
275     "perftests/measurements.cc",
276     "perftests/run_all_tests.cc",
277     "perftests/texture_upload_perftest.cc",
278   ]
280   deps = [
281     "//base",
282     "//base/test:test_support",
283     "//gpu/command_buffer/service",
284     "//testing/gmock",
285     "//testing/gtest",
286     "//testing/perf",
287     "//ui/gfx/geometry",
288     "//ui/gl",
289   ]
292 # TODO(GYP): Delete this after we've converted everything to GN.
293 # The _run targets exist only for compatibility w/ GYP.
294 group("angle_unittests_run") {
295   testonly = true
296   deps = [
297     ":angle_unittests",
298   ]
301 test("angle_unittests") {
302   sources = [
303     "angle_unittest_main.cc",
304   ]
306   deps = [
307     "//base",
308     "//base/test:test_support",
309     "//base/third_party/dynamic_annotations",
310     "//testing/gmock",
311     "//testing/gtest",
312     "//third_party/angle:translator_static",
313   ]
317 # TODO(GYP): Delete this after we've converted everything to GN.
318 # The _run targets exist only for compatibility w/ GYP.
319 group("angle_end2end_tests_run") {
320   testonly = true
321   deps = [
322     ":angle_end2end_tests",
323   ]
326 test("angle_end2end_tests") {
327   sources = [
328     # TODO(crbug.com/519778): Use this instead when angle actually works.
329     # For now, this creates an empty stub binary that will at least
330     # run properly on the bots.
331     # "angle_end2end_tests_main.cc",
332     "//base/test/run_all_unittests.cc",
333   ]
335   deps = [
336     "//base/test:test_support",
337     "//testing/gmock",
338     "//testing/gtest",
340     # TODO(crbug.com/519778): This needs to be implemented.
341     # "//third_party/angle:end_to_end_tests",
342   ]