Use suggested filename for "Save Link As"
[chromium-blink-merge.git] / gpu / BUILD.gn
blob57b660a7865df0c84ff1cc80f9ef0f05f58ae9d9
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:gles2_implementation_client_side_arrays =>
24 #      //gpu/command_buffer/client:gles2_implementation_client_side_arrays
26 #  gpu.gyp:gpu_config => //gpu/config
28 #  gpu.gyp:gpu_ipc => //gpu/ipc
30 #  gpu.gyp:disk_cache_proto => //gpu/command_buffer/service:disk_cache_proto
32 #  command_buffer/command_buffer.gyp:gles2_utils =>
33 #     //gpu/command_buffer/common
34 #     (Merged in to here because the separate file exists in GYP only to break
35 #     a .gyp file dependency cycle which GN doesn't have.)
37 component("gpu") {
38   deps = [
39     "//gpu/command_buffer/client",
40     "//gpu/command_buffer/common",
41     "//gpu/command_buffer/service",
42     "//gpu/command_buffer/client:gles2_cmd_helper",
43     "//gpu/config",
44     "//gpu/ipc",
45   ]
48 source_set("gpu_unittest_utils") {
49   sources = [
50     "command_buffer/service/gles2_cmd_decoder_mock.cc",
51     "command_buffer/service/error_state_mock.cc",
52     "command_buffer/client/gles2_interface_stub.cc",
53     "command_buffer/client/gles2_interface_stub.h",
54   ]
56   configs += [ "//third_party/khronos:khronos_headers" ]
58   deps = [
59     ":gpu",
60     "//testing/gmock",
61     "//testing/gtest",
62     "//ui/gl:gl_unittest_utils",
63   ]
66 test("gl_tests") {
67   sources = [
68     "command_buffer/tests/compressed_texture_test.cc",
69     "command_buffer/tests/gl_bind_uniform_location_unittest.cc",
70     "command_buffer/tests/gl_chromium_framebuffer_multisample_unittest.cc",
71     "command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc",
72     "command_buffer/tests/gl_depth_texture_unittest.cc",
73     "command_buffer/tests/gl_gpu_memory_buffer_unittest.cc",
74     "command_buffer/tests/gl_lose_context_chromium_unittest.cc",
75     "command_buffer/tests/gl_manager.cc",
76     "command_buffer/tests/gl_manager.h",
77     "command_buffer/tests/gl_pointcoord_unittest.cc",
78     "command_buffer/tests/gl_program_unittest.cc",
79     "command_buffer/tests/gl_query_unittest.cc",
80     "command_buffer/tests/gl_readback_unittest.cc",
81     "command_buffer/tests/gl_shared_resources_unittest.cc",
82     "command_buffer/tests/gl_stream_draw_unittest.cc",
83     "command_buffer/tests/gl_test_utils.cc",
84     "command_buffer/tests/gl_test_utils.h",
85     "command_buffer/tests/gl_tests_main.cc",
86     "command_buffer/tests/gl_texture_mailbox_unittest.cc",
87     "command_buffer/tests/gl_texture_storage_unittest.cc",
88     "command_buffer/tests/gl_unittest.cc",
89     "command_buffer/tests/gl_unittests_android.cc",
90     "command_buffer/tests/gl_virtual_contexts_unittest.cc",
91     "command_buffer/tests/occlusion_query_unittest.cc",
92   ]
94   defines = [
95     "GL_GLEXT_PROTOTYPES",
96   ]
98   deps = [
99     ":gpu",
100     ":gpu_unittest_utils",
101     "//base",
102     "//base/third_party/dynamic_annotations",
103     "//testing/gmock",
104     "//testing/gtest",
105     "//third_party/angle:translator",
106     "//ui/gfx",
107     "//ui/gfx/geometry",
108     "//ui/gl",
109     #"//gpu/command_buffer/client",  # These are all part of //gpu, needed?
110     #"//gpu/command_buffer/common",
111     #"//gpu/command_buffer/service",
112     #"//gpu/command_buffer/client:gles2_cmd_helper",
113     "//gpu/command_buffer/client:gles2_c_lib",
114     "//gpu/command_buffer/client:gles2_implementation_client_side_arrays",
115   ]
117   # TODO(GYP)
118   #     ['OS == "android"', {
119   #       'dependencies': [
120   #         '../testing/android/native_test.gyp:native_test_native_code',
121   #       ],
122   #     }],
123   #     ['OS == "win"', {
124   #       'dependencies': [
125   #         '../third_party/angle/src/build_angle.gyp:libEGL',
126   #         '../third_party/angle/src/build_angle.gyp:libGLESv2',
127   #       ],
128   #     }],
131 test("gpu_unittests") {
132   sources = [
133     "command_buffer/client/buffer_tracker_unittest.cc",
134     "command_buffer/client/client_test_helper.cc",
135     "command_buffer/client/client_test_helper.h",
136     "command_buffer/client/cmd_buffer_helper_test.cc",
137     "command_buffer/client/fenced_allocator_test.cc",
138     "command_buffer/client/gles2_implementation_unittest.cc",
139     "command_buffer/client/mapped_memory_unittest.cc",
140     "command_buffer/client/query_tracker_unittest.cc",
141     "command_buffer/client/program_info_manager_unittest.cc",
142     "command_buffer/client/ring_buffer_test.cc",
143     "command_buffer/client/transfer_buffer_unittest.cc",
144     "command_buffer/client/vertex_array_object_manager_unittest.cc",
145     "command_buffer/common/bitfield_helpers_test.cc",
146     "command_buffer/common/command_buffer_mock.cc",
147     "command_buffer/common/command_buffer_mock.h",
148     "command_buffer/common/command_buffer_shared_test.cc",
149     "command_buffer/common/debug_marker_manager_unittest.cc",
150     "command_buffer/common/gles2_cmd_format_test.cc",
151     "command_buffer/common/gles2_cmd_format_test_autogen.h",
152     "command_buffer/common/gles2_cmd_utils_unittest.cc",
153     "command_buffer/common/id_allocator_test.cc",
154     "command_buffer/common/trace_event.h",
155     "command_buffer/common/unittest_main.cc",
156     "command_buffer/service/async_pixel_transfer_delegate_mock.h",
157     "command_buffer/service/async_pixel_transfer_delegate_mock.cc",
158     "command_buffer/service/async_pixel_transfer_manager_mock.h",
159     "command_buffer/service/async_pixel_transfer_manager_mock.cc",
160     "command_buffer/service/buffer_manager_unittest.cc",
161     "command_buffer/service/cmd_parser_test.cc",
162     "command_buffer/service/command_buffer_service_unittest.cc",
163     "command_buffer/service/common_decoder_unittest.cc",
164     "command_buffer/service/context_group_unittest.cc",
165     "command_buffer/service/feature_info_unittest.cc",
166     "command_buffer/service/framebuffer_manager_unittest.cc",
167     "command_buffer/service/gles2_cmd_decoder_unittest.cc",
168     "command_buffer/service/gles2_cmd_decoder_unittest.h",
169     "command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h",
170     "command_buffer/service/gles2_cmd_decoder_unittest_1.cc",
171     "command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h",
172     "command_buffer/service/gles2_cmd_decoder_unittest_2.cc",
173     "command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h",
174     "command_buffer/service/gles2_cmd_decoder_unittest_3.cc",
175     "command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h",
176     "command_buffer/service/gles2_cmd_decoder_unittest_async_pixel.cc",
177     "command_buffer/service/gles2_cmd_decoder_unittest_base.cc",
178     "command_buffer/service/gles2_cmd_decoder_unittest_base.h",
179     "command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc",
180     "command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc",
181     "command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc",
182     "command_buffer/service/gles2_cmd_decoder_unittest_programs.cc",
183     "command_buffer/service/gles2_cmd_decoder_unittest_textures.cc",
184     "command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc",
185     "command_buffer/service/gl_surface_mock.cc",
186     "command_buffer/service/gl_surface_mock.h",
187     "command_buffer/service/gpu_scheduler_unittest.cc",
188     "command_buffer/service/gpu_service_test.cc",
189     "command_buffer/service/gpu_service_test.h",
190     "command_buffer/service/id_manager_unittest.cc",
191     "command_buffer/service/mailbox_manager_unittest.cc",
192     "command_buffer/service/memory_program_cache_unittest.cc",
193     "command_buffer/service/mocks.cc",
194     "command_buffer/service/mocks.h",
195     "command_buffer/service/program_manager_unittest.cc",
196     "command_buffer/service/query_manager_unittest.cc",
197     "command_buffer/service/renderbuffer_manager_unittest.cc",
198     "command_buffer/service/program_cache_unittest.cc",
199     "command_buffer/service/shader_manager_unittest.cc",
200     "command_buffer/service/shader_translator_unittest.cc",
201     "command_buffer/service/test_helper.cc",
202     "command_buffer/service/test_helper.h",
203     "command_buffer/service/texture_manager_unittest.cc",
204     "command_buffer/service/transfer_buffer_manager_unittest.cc",
205     "command_buffer/service/vertex_attrib_manager_unittest.cc",
206     "command_buffer/service/vertex_array_manager_unittest.cc",
207     "command_buffer/service/gpu_tracer_unittest.cc",
208     "config/gpu_blacklist_unittest.cc",
209     "config/gpu_control_list_entry_unittest.cc",
210     "config/gpu_control_list_number_info_unittest.cc",
211     "config/gpu_control_list_os_info_unittest.cc",
212     "config/gpu_control_list_string_info_unittest.cc",
213     "config/gpu_control_list_unittest.cc",
214     "config/gpu_control_list_version_info_unittest.cc",
215     "config/gpu_driver_bug_list_unittest.cc",
216     "config/gpu_info_collector_unittest.cc",
217     "config/gpu_info_unittest.cc",
218     "config/gpu_test_config_unittest.cc",
219     "config/gpu_test_expectations_parser_unittest.cc",
220     "config/gpu_util_unittest.cc",
221   ]
223   deps = [
224     ":gpu",
225     ":gpu_unittest_utils",
226     "//base",
227     "//base/test:test_support",
228     "//base/third_party/dynamic_annotations",
229     "//testing/gmock",
230     "//testing/gtest",
231     "//third_party/angle:translator",
232     "//ui/gfx",
233     "//ui/gfx/geometry",
234     "//ui/gl",
235     "//gpu/command_buffer/client:gles2_c_lib",
236     "//gpu/command_buffer/client:gles2_implementation_client_side_arrays",
237   ]