OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 { | 5 { |
6 'variables': { | 6 'include_dirs': [ |
7 'chromium_code': 1, | 7 '<(DEPTH)/third_party/khronos', |
8 # These are defined here because we need to build this library twice. Once | 8 ], |
9 # with extra parameter checking. Once with no parameter checking to be 100% | 9 'all_dependent_settings': { |
10 # OpenGL ES 2.0 compliant for the conformance tests. | 10 'include_dirs': [ |
11 'gles2_c_lib_source_files': [ | 11 '<(DEPTH)/third_party/khronos', |
12 'command_buffer/client/gles2_c_lib.cc', | |
13 'command_buffer/client/gles2_c_lib_autogen.h', | |
14 'command_buffer/client/gles2_c_lib_export.h', | |
15 'command_buffer/client/gles2_lib.h', | |
16 'command_buffer/client/gles2_lib.cc', | |
17 ], | 12 ], |
18 # These are defined here because we need to build this library twice. Once | |
19 # with without support for client side arrays and once with for pepper and | |
20 # the OpenGL ES 2.0 compliant for the conformance tests. | |
21 'gles2_implementation_source_files': [ | |
22 'command_buffer/client/gles2_implementation_autogen.h', | |
23 'command_buffer/client/gles2_implementation.cc', | |
24 'command_buffer/client/gles2_implementation.h', | |
25 'command_buffer/client/program_info_manager.cc', | |
26 'command_buffer/client/program_info_manager.h', | |
27 ] | |
28 }, | 13 }, |
29 'targets': [ | 14 'dependencies': [ |
30 { | 15 '../base/base.gyp:base', |
31 'target_name': 'command_buffer_common', | 16 'command_buffer/command_buffer.gyp:gles2_utils', |
32 'type': 'static_library', | 17 ], |
33 'include_dirs': [ | 18 'sources': [ |
34 '<(DEPTH)/third_party/khronos', | 19 'command_buffer/common/bitfield_helpers.h', |
35 ], | 20 'command_buffer/common/buffer.h', |
36 'all_dependent_settings': { | 21 'command_buffer/common/cmd_buffer_common.h', |
37 'include_dirs': [ | 22 'command_buffer/common/cmd_buffer_common.cc', |
38 '<(DEPTH)/third_party/khronos', | 23 'command_buffer/common/command_buffer.h', |
39 ], | 24 'command_buffer/common/compiler_specific.h', |
40 }, | 25 'command_buffer/common/constants.h', |
41 'dependencies': [ | 26 'command_buffer/common/gles2_cmd_ids_autogen.h', |
42 '../base/base.gyp:base', | 27 'command_buffer/common/gles2_cmd_ids.h', |
43 'command_buffer/command_buffer.gyp:gles2_utils', | 28 'command_buffer/common/gles2_cmd_format_autogen.h', |
44 ], | 29 'command_buffer/common/gles2_cmd_format.cc', |
45 'export_dependent_settings': [ | 30 'command_buffer/common/gles2_cmd_format.h', |
46 '../base/base.gyp:base', | 31 'command_buffer/common/id_allocator.cc', |
47 ], | 32 'command_buffer/common/id_allocator.h', |
48 'sources': [ | 33 'command_buffer/common/thread_local.h', |
49 'command_buffer/common/bitfield_helpers.h', | 34 'command_buffer/common/types.h', |
50 'command_buffer/common/buffer.h', | |
51 'command_buffer/common/cmd_buffer_common.h', | |
52 'command_buffer/common/cmd_buffer_common.cc', | |
53 'command_buffer/common/command_buffer.h', | |
54 'command_buffer/common/compiler_specific.h', | |
55 'command_buffer/common/constants.h', | |
56 'command_buffer/common/gles2_cmd_ids_autogen.h', | |
57 'command_buffer/common/gles2_cmd_ids.h', | |
58 'command_buffer/common/gles2_cmd_format_autogen.h', | |
59 'command_buffer/common/gles2_cmd_format.cc', | |
60 'command_buffer/common/gles2_cmd_format.h', | |
61 'command_buffer/common/id_allocator.cc', | |
62 'command_buffer/common/id_allocator.h', | |
63 'command_buffer/common/thread_local.h', | |
64 'command_buffer/common/types.h', | |
65 ], | |
66 }, | |
67 { | |
68 # Library helps make GLES2 command buffers. | |
69 'target_name': 'gles2_cmd_helper', | |
70 'type': 'static_library', | |
71 'dependencies': [ | |
72 'command_buffer_client', | |
73 ], | |
74 'sources': [ | |
75 'command_buffer/client/gles2_cmd_helper.cc', | |
76 'command_buffer/client/gles2_cmd_helper.h', | |
77 'command_buffer/client/gles2_cmd_helper_autogen.h', | |
78 ], | |
79 }, | |
80 { | |
81 # Library emulates GLES2 using command_buffers. | |
82 'target_name': 'gles2_implementation', | |
83 'type': 'static_library', | |
84 'dependencies': [ | |
85 '../base/base.gyp:base', | |
86 '../ui/gfx/gl/gl.gyp:gl', | |
87 'gles2_cmd_helper', | |
88 ], | |
89 'all_dependent_settings': { | |
90 'include_dirs': [ | |
91 # For GLES2/gl2.h | |
92 '<(DEPTH)/third_party/khronos', | |
93 ], | |
94 }, | |
95 'sources': [ | |
96 '<@(gles2_implementation_source_files)', | |
97 ], | |
98 }, | |
99 { | |
100 # Library emulates GLES2 using command_buffers. | |
101 'target_name': 'gles2_implementation_client_side_arrays', | |
102 'type': 'static_library', | |
103 'defines': [ | |
104 'GLES2_SUPPORT_CLIENT_SIDE_ARRAYS=1', | |
105 ], | |
106 'dependencies': [ | |
107 '../base/base.gyp:base', | |
108 'gles2_cmd_helper', | |
109 ], | |
110 'all_dependent_settings': { | |
111 'include_dirs': [ | |
112 # For GLES2/gl2.h | |
113 '<(DEPTH)/third_party/khronos', | |
114 ], | |
115 }, | |
116 'sources': [ | |
117 '<@(gles2_implementation_source_files)', | |
118 ], | |
119 }, | |
120 { | |
121 # Library emulates GLES2 using command_buffers. | |
122 'target_name': 'gles2_implementation_client_side_arrays_no_check', | |
123 'type': 'static_library', | |
124 'defines': [ | |
125 'GLES2_SUPPORT_CLIENT_SIDE_ARRAYS=1', | |
126 'GLES2_CONFORMANCE_TESTS=1', | |
127 ], | |
128 'dependencies': [ | |
129 '../base/base.gyp:base', | |
130 'gles2_cmd_helper', | |
131 ], | |
132 'all_dependent_settings': { | |
133 'include_dirs': [ | |
134 # For GLES2/gl2.h | |
135 '<(DEPTH)/third_party/khronos', | |
136 ], | |
137 }, | |
138 'sources': [ | |
139 '<@(gles2_implementation_source_files)', | |
140 ], | |
141 }, | |
142 { | |
143 # Stub to expose gles2_implemenation in C instead of C++. | |
144 # so GLES2 C programs can work with no changes. | |
145 'target_name': 'gles2_c_lib', | |
146 'type': '<(component)', | |
147 'dependencies': [ | |
148 '../base/base.gyp:base', | |
149 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic
_annotations', | |
150 'gles2_implementation', | |
151 ], | |
152 'defines': [ | |
153 'GLES2_C_LIB_IMPLEMENTATION', | |
154 ], | |
155 'sources': [ | |
156 '<@(gles2_c_lib_source_files)', | |
157 ], | |
158 }, | |
159 { | |
160 # Same as gles2_c_lib except with no parameter checking. Required for | |
161 # OpenGL ES 2.0 conformance tests. | |
162 'target_name': 'gles2_c_lib_nocheck', | |
163 'type': '<(component)', | |
164 'defines': [ | |
165 'GLES2_C_LIB_IMPLEMENTATION', | |
166 'GLES2_CONFORMANCE_TESTS=1', | |
167 ], | |
168 'dependencies': [ | |
169 '../base/base.gyp:base', | |
170 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic
_annotations', | |
171 'gles2_implementation_client_side_arrays_no_check', | |
172 ], | |
173 'sources': [ | |
174 '<@(gles2_c_lib_source_files)', | |
175 ], | |
176 }, | |
177 { | |
178 'target_name': 'command_buffer_client', | |
179 'type': 'static_library', | |
180 'include_dirs': [ | |
181 '..', | |
182 '<(DEPTH)/third_party/khronos', | |
183 ], | |
184 'all_dependent_settings': { | |
185 'include_dirs': [ | |
186 '..', | |
187 '<(DEPTH)/third_party/khronos', | |
188 ], | |
189 }, | |
190 'dependencies': [ | |
191 'command_buffer_common', | |
192 ], | |
193 'sources': [ | |
194 'command_buffer/client/cmd_buffer_helper.cc', | |
195 'command_buffer/client/cmd_buffer_helper.h', | |
196 'command_buffer/client/fenced_allocator.cc', | |
197 'command_buffer/client/fenced_allocator.h', | |
198 'command_buffer/client/mapped_memory.cc', | |
199 'command_buffer/client/mapped_memory.h', | |
200 'command_buffer/client/ring_buffer.cc', | |
201 'command_buffer/client/ring_buffer.h', | |
202 'command_buffer/client/transfer_buffer.cc', | |
203 'command_buffer/client/transfer_buffer.h', | |
204 ], | |
205 }, | |
206 { | |
207 'target_name': 'command_buffer_service', | |
208 'type': 'static_library', | |
209 'include_dirs': [ | |
210 '..', | |
211 '<(DEPTH)/third_party/khronos', | |
212 ], | |
213 'all_dependent_settings': { | |
214 'include_dirs': [ | |
215 '..', | |
216 '<(DEPTH)/third_party/khronos', | |
217 ], | |
218 }, | |
219 'dependencies': [ | |
220 'command_buffer_common', | |
221 '../base/base.gyp:base', | |
222 '../ui/gfx/gl/gl.gyp:gl', | |
223 '../ui/gfx/surface/surface.gyp:surface', | |
224 '../ui/ui.gyp:ui', | |
225 '../third_party/angle/src/build_angle.gyp:translator_glsl', | |
226 ], | |
227 'sources': [ | |
228 'command_buffer/service/buffer_manager.h', | |
229 'command_buffer/service/buffer_manager.cc', | |
230 'command_buffer/service/framebuffer_manager.h', | |
231 'command_buffer/service/framebuffer_manager.cc', | |
232 'command_buffer/service/cmd_buffer_engine.h', | |
233 'command_buffer/service/cmd_parser.cc', | |
234 'command_buffer/service/cmd_parser.h', | |
235 'command_buffer/service/command_buffer_service.cc', | |
236 'command_buffer/service/command_buffer_service.h', | |
237 'command_buffer/service/common_decoder.cc', | |
238 'command_buffer/service/common_decoder.h', | |
239 'command_buffer/service/context_group.h', | |
240 'command_buffer/service/context_group.cc', | |
241 'command_buffer/service/feature_info.h', | |
242 'command_buffer/service/feature_info.cc', | |
243 'command_buffer/service/gles2_cmd_decoder.h', | |
244 'command_buffer/service/gles2_cmd_decoder_autogen.h', | |
245 'command_buffer/service/gles2_cmd_decoder.cc', | |
246 'command_buffer/service/gles2_cmd_validation.h', | |
247 'command_buffer/service/gles2_cmd_validation.cc', | |
248 'command_buffer/service/gles2_cmd_validation_autogen.h', | |
249 'command_buffer/service/gles2_cmd_validation_implementation_autogen.h', | |
250 'command_buffer/service/gl_utils.h', | |
251 'command_buffer/service/gpu_scheduler.h', | |
252 'command_buffer/service/gpu_scheduler.cc', | |
253 'command_buffer/service/gpu_scheduler_mock.h', | |
254 'command_buffer/service/gpu_switches.h', | |
255 'command_buffer/service/gpu_switches.cc', | |
256 'command_buffer/service/id_manager.h', | |
257 'command_buffer/service/id_manager.cc', | |
258 'command_buffer/service/mocks.h', | |
259 'command_buffer/service/program_manager.h', | |
260 'command_buffer/service/program_manager.cc', | |
261 'command_buffer/service/renderbuffer_manager.h', | |
262 'command_buffer/service/renderbuffer_manager.cc', | |
263 'command_buffer/service/shader_manager.h', | |
264 'command_buffer/service/shader_manager.cc', | |
265 'command_buffer/service/shader_translator.h', | |
266 'command_buffer/service/shader_translator.cc', | |
267 'command_buffer/service/stream_texture.h', | |
268 'command_buffer/service/stream_texture_manager.h', | |
269 'command_buffer/service/texture_manager.h', | |
270 'command_buffer/service/texture_manager.cc', | |
271 'command_buffer/service/vertex_attrib_manager.h', | |
272 'command_buffer/service/vertex_attrib_manager.cc', | |
273 ], | |
274 'conditions': [ | |
275 ['toolkit_uses_gtk == 1', { | |
276 'dependencies': [ | |
277 '../build/linux/system.gyp:gtk', | |
278 ], | |
279 }], | |
280 ['ui_compositor_image_transport==1', { | |
281 'include_dirs': [ | |
282 '<(DEPTH)/third_party/angle/include', | |
283 ], | |
284 }], | |
285 ], | |
286 }, | |
287 { | |
288 'target_name': 'gpu_unittests', | |
289 'type': 'executable', | |
290 'dependencies': [ | |
291 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic
_annotations', | |
292 '../testing/gmock.gyp:gmock', | |
293 '../testing/gmock.gyp:gmock_main', | |
294 '../testing/gtest.gyp:gtest', | |
295 '../ui/gfx/gl/gl.gyp:gl', | |
296 'command_buffer_client', | |
297 'command_buffer_common', | |
298 'command_buffer_service', | |
299 'gpu_unittest_utils', | |
300 'gles2_implementation_client_side_arrays', | |
301 'gles2_cmd_helper', | |
302 ], | |
303 'defines': [ | |
304 'GLES2_C_LIB_IMPLEMENTATION', | |
305 ], | |
306 'sources': [ | |
307 '<@(gles2_c_lib_source_files)', | |
308 'command_buffer/client/client_test_helper.cc', | |
309 'command_buffer/client/client_test_helper.h', | |
310 'command_buffer/client/cmd_buffer_helper_test.cc', | |
311 'command_buffer/client/fenced_allocator_test.cc', | |
312 'command_buffer/client/gles2_implementation_unittest.cc', | |
313 'command_buffer/client/mapped_memory_unittest.cc', | |
314 'command_buffer/client/program_info_manager_unittest.cc', | |
315 'command_buffer/client/ring_buffer_test.cc', | |
316 'command_buffer/client/transfer_buffer_unittest.cc', | |
317 'command_buffer/common/bitfield_helpers_test.cc', | |
318 'command_buffer/common/command_buffer_mock.cc', | |
319 'command_buffer/common/command_buffer_mock.h', | |
320 'command_buffer/common/gles2_cmd_format_test.cc', | |
321 'command_buffer/common/gles2_cmd_format_test_autogen.h', | |
322 'command_buffer/common/gles2_cmd_utils_unittest.cc', | |
323 'command_buffer/common/id_allocator_test.cc', | |
324 'command_buffer/common/trace_event.h', | |
325 'command_buffer/common/unittest_main.cc', | |
326 'command_buffer/service/buffer_manager_unittest.cc', | |
327 'command_buffer/service/cmd_parser_test.cc', | |
328 'command_buffer/service/common_decoder_unittest.cc', | |
329 'command_buffer/service/context_group_unittest.cc', | |
330 'command_buffer/service/feature_info_unittest.cc', | |
331 'command_buffer/service/framebuffer_manager_unittest.cc', | |
332 'command_buffer/service/gles2_cmd_decoder_unittest.cc', | |
333 'command_buffer/service/gles2_cmd_decoder_unittest_1.cc', | |
334 'command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h', | |
335 'command_buffer/service/gles2_cmd_decoder_unittest_2.cc', | |
336 'command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h', | |
337 'command_buffer/service/gles2_cmd_decoder_unittest_3.cc', | |
338 'command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h', | |
339 'command_buffer/service/gles2_cmd_decoder_unittest_base.cc', | |
340 'command_buffer/service/gles2_cmd_decoder_unittest_base.h', | |
341 'command_buffer/service/gpu_scheduler_unittest.cc', | |
342 'command_buffer/service/id_manager_unittest.cc', | |
343 'command_buffer/service/mocks.cc', | |
344 'command_buffer/service/mocks.h', | |
345 'command_buffer/service/program_manager_unittest.cc', | |
346 'command_buffer/service/renderbuffer_manager_unittest.cc', | |
347 'command_buffer/service/shader_manager_unittest.cc', | |
348 'command_buffer/service/shader_translator_unittest.cc', | |
349 'command_buffer/service/stream_texture_mock.cc', | |
350 'command_buffer/service/stream_texture_mock.h', | |
351 'command_buffer/service/stream_texture_manager_mock.cc', | |
352 'command_buffer/service/stream_texture_manager_mock.h', | |
353 'command_buffer/service/test_helper.cc', | |
354 'command_buffer/service/test_helper.h', | |
355 'command_buffer/service/texture_manager_unittest.cc', | |
356 'command_buffer/service/vertex_attrib_manager_unittest.cc', | |
357 ], | |
358 }, | |
359 { | |
360 'target_name': 'gpu_unittest_utils', | |
361 'type': 'static_library', | |
362 'dependencies': [ | |
363 '../testing/gmock.gyp:gmock', | |
364 '../testing/gtest.gyp:gtest', | |
365 '../ui/gfx/gl/gl.gyp:gl', | |
366 ], | |
367 'include_dirs': [ | |
368 '..', | |
369 '<(DEPTH)/third_party/khronos', | |
370 ], | |
371 'sources': [ | |
372 'command_buffer/common/gl_mock.h', | |
373 'command_buffer/common/gl_mock.cc', | |
374 'command_buffer/service/gles2_cmd_decoder_mock.cc', | |
375 'command_buffer/service/gles2_cmd_decoder_mock.cc', | |
376 ], | |
377 }, | |
378 { | |
379 'target_name': 'gpu_ipc', | |
380 'type': 'static_library', | |
381 'dependencies': [ | |
382 'command_buffer_client', | |
383 'gles2_c_lib', | |
384 '../base/base.gyp:base', | |
385 ], | |
386 'include_dirs': [ | |
387 '..', | |
388 '<(DEPTH)/third_party/khronos', | |
389 ], | |
390 'sources': [ | |
391 'ipc/gpu_command_buffer_traits.cc', | |
392 'ipc/gpu_command_buffer_traits.h', | |
393 ], | |
394 }, | |
395 ], | 35 ], |
396 } | 36 } |
OLD | NEW |