Roll src/third_party/WebKit 3c1b001:57aef96 (svn 201977:201978)
[chromium-blink-merge.git] / gpu / gpu.gyp
blob48a779459c89b74518b0bb02229f9892a08e98f5
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
3 # found in the LICENSE file.
6   'variables': {
7     'nacl_win64_target': 0,
8   },
9   'includes': [
10     'gpu_common.gypi',
11   ],
12   'targets': [
13     {
14       # Library emulates GLES2 using command_buffers.
15       # GN version: //gpu/command_buffer/client:gles2_implementation
16       'target_name': 'gles2_implementation',
17       'type': '<(component)',
18       'dependencies': [
19         '../base/base.gyp:base',
20         '../third_party/khronos/khronos.gyp:khronos_headers',
21         '../ui/gfx/gfx.gyp:gfx_geometry',
22         '../ui/gl/gl.gyp:gl',
23         'command_buffer/command_buffer.gyp:gles2_utils',
24         'gles2_cmd_helper',
25       ],
26       'defines': [
27         'GLES2_IMPL_IMPLEMENTATION',
28       ],
29       'sources': [
30         '<@(gles2_implementation_source_files)',
31       ],
32       'includes': [
33         # Disable LTO due to ELF section name out of range
34         # crbug.com/422251
35         '../build/android/disable_gcc_lto.gypi',
36       ],
37       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
38       'msvs_disabled_warnings': [4267, ],
39     },
40     {
41       # GN version: //gpu/command_buffer/client:gl_in_process_context
42       'target_name': 'gl_in_process_context',
43       'type': '<(component)',
44       'dependencies': [
45         'command_buffer/command_buffer.gyp:gles2_utils',
46         'gles2_implementation',
47         'gpu',
48         '../base/base.gyp:base',
49         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
50         '../ui/gfx/gfx.gyp:gfx_geometry',
51         '../ui/gl/gl.gyp:gl',
52       ],
53       'defines': [
54         'GL_IN_PROCESS_CONTEXT_IMPLEMENTATION',
55       ],
56       'sources': [
57         'command_buffer/client/gl_in_process_context.cc',
58         'command_buffer/client/gl_in_process_context.h',
59         'command_buffer/client/gl_in_process_context_export.h',
60       ],
61     },
62     {
63       # Library emulates GLES2 using command_buffers.
64       'target_name': 'gles2_implementation_no_check',
65       'type': '<(component)',
66       'defines': [
67         'GLES2_IMPL_IMPLEMENTATION',
68         'GLES2_CONFORMANCE_TESTS=1',
69       ],
70       'dependencies': [
71         '../base/base.gyp:base',
72         '../third_party/khronos/khronos.gyp:khronos_headers',
73         '../ui/gfx/gfx.gyp:gfx',
74         '../ui/gfx/gfx.gyp:gfx_geometry',
75         'command_buffer/command_buffer.gyp:gles2_utils',
76         'gles2_cmd_helper',
77       ],
78       'sources': [
79         '<@(gles2_implementation_source_files)',
80       ],
81       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
82       'msvs_disabled_warnings': [ 4267, ],
83     },
84     {
85       # Stub to expose gles2_implemenation in C instead of C++.
86       # so GLES2 C programs can work with no changes.
87       # GN version: //gpu/command_buffer/client:gles2_c_lib
88       'target_name': 'gles2_c_lib',
89       'type': '<(component)',
90       'dependencies': [
91         '../base/base.gyp:base',
92         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
93         'command_buffer/command_buffer.gyp:gles2_utils',
94         'command_buffer_client',
95       ],
96       'defines': [
97         'GLES2_C_LIB_IMPLEMENTATION',
98       ],
99       'sources': [
100         '<@(gles2_c_lib_source_files)',
101       ],
102       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
103       'msvs_disabled_warnings': [4267, ],
104     },
105     {
106       # GN version: //gpu/command_buffer/client:gles2_c_lib_nocheck
107       # Same as gles2_c_lib except with no parameter checking. Required for
108       # OpenGL ES 2.0 conformance tests.
109       'target_name': 'gles2_c_lib_nocheck',
110       'type': '<(component)',
111       'defines': [
112         'GLES2_C_LIB_IMPLEMENTATION',
113         'GLES2_CONFORMANCE_TESTS=1',
114       ],
115       'dependencies': [
116         '../base/base.gyp:base',
117         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
118         'command_buffer/command_buffer.gyp:gles2_utils',
119         'command_buffer_client',
120         'gles2_implementation_no_check',
121       ],
122       'sources': [
123         '<@(gles2_c_lib_source_files)',
124       ],
125     },
126     {
127       # GN version: //gpu:angle_unittests
128       # TODO(kbr): port this refactoring to the GN build.
129       'target_name': 'angle_unittests',
130       'type': '<(gtest_target_type)',
131       'includes': [
132         '../third_party/angle/build/common_defines.gypi',
133         '../third_party/angle/src/tests/angle_unittests.gypi',
134       ],
135       'dependencies': [
136         '../base/base.gyp:base',
137         '../base/base.gyp:test_support_base',
138       ],
139       'include_dirs': [
140         '..',
141         '../third_party/angle/include',
142       ],
143       'sources': [
144         'angle_unittest_main.cc',
145       ],
146     },
147     {
148       # GN version: //gpu:gpu_unittests
149       'target_name': 'gpu_unittests',
150       'type': '<(gtest_target_type)',
151       'dependencies': [
152         '../base/base.gyp:base',
153         '../base/base.gyp:test_support_base',
154         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
155         '../testing/gmock.gyp:gmock',
156         '../testing/gtest.gyp:gtest',
157         '<(angle_path)/src/angle.gyp:translator',
158         '../ui/gfx/gfx.gyp:gfx',
159         '../ui/gfx/gfx.gyp:gfx_geometry',
160         '../ui/gfx/gfx.gyp:gfx_test_support',
161         '../ui/gl/gl.gyp:gl',
162         '../ui/gl/gl.gyp:gl_test_support',
163         'command_buffer/command_buffer.gyp:gles2_utils',
164         'command_buffer_client',
165         'command_buffer_common',
166         'command_buffer_service',
167         'gpu',
168         'gpu_unittest_utils',
169         'gles2_implementation',
170         'gles2_cmd_helper',
171         'gles2_c_lib',
172       ],
173       'sources': [
174         # Note: sources list duplicated in GN build.
175         'command_buffer/client/buffer_tracker_unittest.cc',
176         'command_buffer/client/client_test_helper.cc',
177         'command_buffer/client/client_test_helper.h',
178         'command_buffer/client/cmd_buffer_helper_test.cc',
179         'command_buffer/client/fenced_allocator_test.cc',
180         'command_buffer/client/gles2_implementation_unittest.cc',
181         'command_buffer/client/mapped_memory_unittest.cc',
182         'command_buffer/client/program_info_manager_unittest.cc',
183         'command_buffer/client/query_tracker_unittest.cc',
184         'command_buffer/client/ring_buffer_test.cc',
185         'command_buffer/client/transfer_buffer_unittest.cc',
186         'command_buffer/client/vertex_array_object_manager_unittest.cc',
187         'command_buffer/common/bitfield_helpers_test.cc',
188         'command_buffer/common/command_buffer_mock.cc',
189         'command_buffer/common/command_buffer_mock.h',
190         'command_buffer/common/command_buffer_shared_test.cc',
191         'command_buffer/common/debug_marker_manager_unittest.cc',
192         'command_buffer/common/gles2_cmd_format_test.cc',
193         'command_buffer/common/gles2_cmd_format_test_autogen.h',
194         'command_buffer/common/gles2_cmd_utils_unittest.cc',
195         'command_buffer/common/id_allocator_test.cc',
196         'command_buffer/common/trace_event.h',
197         'command_buffer/common/unittest_main.cc',
198         'command_buffer/service/buffer_manager_unittest.cc',
199         'command_buffer/service/cmd_parser_test.cc',
200         'command_buffer/service/command_buffer_service_unittest.cc',
201         'command_buffer/service/common_decoder_unittest.cc',
202         'command_buffer/service/context_group_unittest.cc',
203         'command_buffer/service/context_state_unittest.cc',
204         'command_buffer/service/feature_info_unittest.cc',
205         'command_buffer/service/framebuffer_manager_unittest.cc',
206         'command_buffer/service/gl_context_mock.cc',
207         'command_buffer/service/gl_context_mock.h',
208         'command_buffer/service/gl_surface_mock.cc',
209         'command_buffer/service/gl_surface_mock.h',
210         'command_buffer/service/gles2_cmd_decoder_unittest.cc',
211         'command_buffer/service/gles2_cmd_decoder_unittest.h',
212         'command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h',
213         'command_buffer/service/gles2_cmd_decoder_unittest_1.cc',
214         'command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h',
215         'command_buffer/service/gles2_cmd_decoder_unittest_2.cc',
216         'command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h',
217         'command_buffer/service/gles2_cmd_decoder_unittest_3.cc',
218         'command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h',
219         'command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc',
220         'command_buffer/service/gles2_cmd_decoder_unittest_base.cc',
221         'command_buffer/service/gles2_cmd_decoder_unittest_base.h',
222         'command_buffer/service/gles2_cmd_decoder_unittest_buffers.cc',
223         'command_buffer/service/gles2_cmd_decoder_unittest_context_lost.cc',
224         'command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc',
225         'command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc',
226         'command_buffer/service/gles2_cmd_decoder_unittest_extensions.cc',
227         'command_buffer/service/gles2_cmd_decoder_unittest_extensions_autogen.h',
228         'command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc',
229         'command_buffer/service/gles2_cmd_decoder_unittest_programs.cc',
230         'command_buffer/service/gles2_cmd_decoder_unittest_textures.cc',
231         'command_buffer/service/gles2_cmd_decoder_unittest_valuebuffer.cc',
232         'command_buffer/service/gpu_scheduler_unittest.cc',
233         'command_buffer/service/gpu_service_test.cc',
234         'command_buffer/service/gpu_service_test.h',
235         'command_buffer/service/gpu_tracer_unittest.cc',
236         'command_buffer/service/id_manager_unittest.cc',
237         'command_buffer/service/mailbox_manager_unittest.cc',
238         'command_buffer/service/memory_program_cache_unittest.cc',
239         'command_buffer/service/mocks.cc',
240         'command_buffer/service/mocks.h',
241         'command_buffer/service/program_cache_unittest.cc',
242         'command_buffer/service/program_manager_unittest.cc',
243         'command_buffer/service/query_manager_unittest.cc',
244         'command_buffer/service/renderbuffer_manager_unittest.cc',
245         'command_buffer/service/shader_manager_unittest.cc',
246         'command_buffer/service/shader_translator_cache_unittest.cc',
247         'command_buffer/service/shader_translator_unittest.cc',
248         'command_buffer/service/test_helper.cc',
249         'command_buffer/service/test_helper.h',
250         'command_buffer/service/path_manager_unittest.cc',
251         'command_buffer/service/texture_manager_unittest.cc',
252         'command_buffer/service/transfer_buffer_manager_unittest.cc',
253         'command_buffer/service/valuebuffer_manager_unittest.cc',
254         'command_buffer/service/vertex_array_manager_unittest.cc',
255         'command_buffer/service/vertex_attrib_manager_unittest.cc',
256         'config/gpu_blacklist_unittest.cc',
257         'config/gpu_control_list_entry_unittest.cc',
258         'config/gpu_control_list_number_info_unittest.cc',
259         'config/gpu_control_list_os_info_unittest.cc',
260         'config/gpu_control_list_unittest.cc',
261         'config/gpu_control_list_version_info_unittest.cc',
262         'config/gpu_driver_bug_list_unittest.cc',
263         'config/gpu_info_collector_unittest.cc',
264         'config/gpu_info_unittest.cc',
265         'config/gpu_test_config_unittest.cc',
266         'config/gpu_test_expectations_parser_unittest.cc',
267         'config/gpu_util_unittest.cc',
268       ],
269       'conditions': [
270         ['OS == "android"', {
271           'dependencies': [
272             '../testing/android/native_test.gyp:native_test_native_code',
273           ],
274         }],
275         # See http://crbug.com/162998#c4 for why this is needed.
276         ['OS=="linux" and use_allocator!="none"', {
277           'dependencies': [
278             '../base/allocator/allocator.gyp:allocator',
279           ],
280         }],
281       ],
282       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
283       'msvs_disabled_warnings': [ 4267, ],
284     },
285     {
286       # GN version: //gpu/gpu_perftests
287       'target_name': 'gpu_perftests',
288       'type': '<(gtest_target_type)',
289       'dependencies': [
290         '../base/base.gyp:base',
291         '../base/base.gyp:test_support_base',
292         '../testing/gmock.gyp:gmock',
293         '../testing/gtest.gyp:gtest',
294         '../testing/perf/perf_test.gyp:perf_test',
295         '../ui/gfx/gfx.gyp:gfx_geometry',
296         '../ui/gl/gl.gyp:gl',
297         'command_buffer_service',
298       ],
299       'sources': [
300         'perftests/measurements.cc',
301         'perftests/run_all_tests.cc',
302         'perftests/texture_upload_perftest.cc',
303       ],
304       'conditions': [
305         ['OS == "android"',
306           {
307             'dependencies': [
308               '../testing/android/native_test.gyp:native_test_native_code',
309             ],
310           }
311         ],
312         # See http://crbug.com/162998#c4 for why this is needed.
313         ['OS=="linux" and use_allocator!="none"',
314           {
315             'dependencies': [
316               '../base/allocator/allocator.gyp:allocator',
317             ],
318           }
319         ],
320       ],
321     },
322     {
323       # GN version: //gpu:gl_tests
324       'target_name': 'gl_tests',
325       'type': '<(gtest_target_type)',
326       'dependencies': [
327         '../base/base.gyp:base',
328         '../base/base.gyp:test_support_base',
329         '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
330         '../testing/gmock.gyp:gmock',
331         '../testing/gtest.gyp:gtest',
332         '<(angle_path)/src/angle.gyp:translator',
333         '../ui/gfx/gfx.gyp:gfx',
334         '../ui/gfx/gfx.gyp:gfx_test_support',
335         '../ui/gfx/gfx.gyp:gfx_geometry',
336         '../ui/gl/gl.gyp:gl',
337         'command_buffer/command_buffer.gyp:gles2_utils',
338         'command_buffer_client',
339         'command_buffer_common',
340         'command_buffer_service',
341         'gpu',
342         'gpu_unittest_utils',
343         'gles2_implementation',
344         'gles2_cmd_helper',
345         'gles2_c_lib',
346         #'gl_unittests',
347       ],
348       'defines': [
349         'GL_GLEXT_PROTOTYPES',
350       ],
351       'sources': [
352         # Note: sources list duplicated in GN build.
353         'command_buffer/tests/compressed_texture_test.cc',
354         'command_buffer/tests/gl_bind_uniform_location_unittest.cc',
355         'command_buffer/tests/gl_chromium_framebuffer_multisample_unittest.cc',
356         'command_buffer/tests/gl_chromium_path_rendering_unittest.cc',
357         'command_buffer/tests/gl_clear_framebuffer_unittest.cc',
358         'command_buffer/tests/gl_compressed_copy_texture_CHROMIUM_unittest.cc',
359         'command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc',
360         'command_buffer/tests/gl_cube_map_texture_unittest.cc',
361         'command_buffer/tests/gl_depth_texture_unittest.cc',
362         'command_buffer/tests/gl_gpu_memory_buffer_unittest.cc',
363         'command_buffer/tests/gl_lose_context_chromium_unittest.cc',
364         'command_buffer/tests/gl_manager.cc',
365         'command_buffer/tests/gl_manager.h',
366         'command_buffer/tests/gl_pointcoord_unittest.cc',
367         'command_buffer/tests/gl_program_unittest.cc',
368         'command_buffer/tests/gl_query_unittest.cc',
369         'command_buffer/tests/gl_readback_unittest.cc',
370         'command_buffer/tests/gl_shared_resources_unittest.cc',
371         'command_buffer/tests/gl_stream_draw_unittest.cc',
372         'command_buffer/tests/gl_test_utils.cc',
373         'command_buffer/tests/gl_test_utils.h',
374         'command_buffer/tests/gl_tests_main.cc',
375         'command_buffer/tests/gl_texture_mailbox_unittest.cc',
376         'command_buffer/tests/gl_texture_storage_unittest.cc',
377         'command_buffer/tests/gl_unittest.cc',
378         'command_buffer/tests/gl_unittests_android.cc',
379         'command_buffer/tests/gl_virtual_contexts_unittest.cc',
380         'command_buffer/tests/occlusion_query_unittest.cc',
381       ],
382       'conditions': [
383         ['OS == "android"', {
384           'dependencies': [
385             '../testing/android/native_test.gyp:native_test_native_code',
386           ],
387         }],
388         ['OS == "win"', {
389           'dependencies': [
390             '../third_party/angle/src/angle.gyp:libEGL',
391             '../third_party/angle/src/angle.gyp:libGLESv2',
392           ],
393         }],
394       ],
395       # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
396       'msvs_disabled_warnings': [ 4267, ],
397     },
398     {
399       # GN version: //gpu:test_support
400       'target_name': 'gpu_unittest_utils',
401       'type': 'static_library',
402       'dependencies': [
403         '../testing/gmock.gyp:gmock',
404         '../testing/gtest.gyp:gtest',
405         '../third_party/khronos/khronos.gyp:khronos_headers',
406         '../ui/gl/gl.gyp:gl_unittest_utils',
407         'gpu',
408       ],
409       'include_dirs': [
410         '..',
411       ],
412       'sources': [
413         'command_buffer/client/gles2_interface_stub.cc',
414         'command_buffer/client/gles2_interface_stub.h',
415         'command_buffer/service/error_state_mock.cc',
416         'command_buffer/service/gles2_cmd_decoder_mock.cc',
417       ],
418     },
419     {
420       # GN version: //gpu:command_buffer_gles2
421       'target_name': 'command_buffer_gles2',
422       'type': 'shared_library',
423       'dependencies': [
424         '../base/base.gyp:base',
425         '../gpu/gpu.gyp:command_buffer_service',
426         '../ui/gfx/gfx.gyp:gfx_geometry',
427         '../ui/gl/gl.gyp:gl',
428         'gles2_c_lib',
429         'gles2_implementation',
430       ],
431       'sources': [
432         # Note: sources list duplicated in GN build.
433         # TODO(hendrikw): Move egl out of gles2_conform_support.
434         'gles2_conform_support/egl/config.cc',
435         'gles2_conform_support/egl/config.h',
436         'gles2_conform_support/egl/display.cc',
437         'gles2_conform_support/egl/display.h',
438         'gles2_conform_support/egl/egl.cc',
439         'gles2_conform_support/egl/surface.cc',
440         'gles2_conform_support/egl/surface.h',
441       ],
442       'conditions': [
443         ['OS=="win"', {
444           'defines': [
445             'COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY',
446             'EGLAPIENTRY=',
447             'EGLAPI=__declspec(dllexport)',
448           ],
449         }, { # OS!="win"
450           'defines': [
451             'COMMAND_BUFFER_GLES_LIB_SUPPORT_ONLY',
452             'EGLAPIENTRY=',
453             'EGLAPI=__attribute__((visibility(\"default\")))'
454           ],
455         }, ],
456       ],
457     }
458   ],
459   'conditions': [
460     ['component=="static_library"', {
461       'targets': [
462          {
463           # GN version: //gpu/command_buffer/service:disk_cache_proto
464           'target_name': 'disk_cache_proto',
465           'type': 'static_library',
466           'sources': [ 'command_buffer/service/disk_cache_proto.proto' ],
467           'variables': {
468             'proto_in_dir': 'command_buffer/service',
469             'proto_out_dir': 'gpu/command_buffer/service',
470           },
471           'includes': [ '../build/protoc.gypi' ],
472         },
473         {
474           # GN version: //gpu
475           'target_name': 'gpu',
476           'type': 'none',
477           'dependencies': [
478             'command_buffer_client',
479             'command_buffer_common',
480             'command_buffer_service',
481             'gles2_cmd_helper',
482             'gpu_config',
483             'gpu_ipc',
484           ],
485           'sources': [
486             'gpu_export.h',
487           ],
488           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
489           'msvs_disabled_warnings': [4267, ],
490         },
491         {
492           # GN version: //gpu/command_buffer/common
493           'target_name': 'command_buffer_common',
494           'type': 'static_library',
495           'includes': [
496             'command_buffer_common.gypi',
497           ],
498           'dependencies': [
499             '../base/base.gyp:base',
500             'command_buffer/command_buffer.gyp:gles2_utils',
501           ],
502           'export_dependent_settings': [
503             '../base/base.gyp:base',
504           ],
505         },
506         {
507           # Library helps make GLES2 command buffers.
508           # GN version: //gpu/command_buffer/client:gles2_cmd_helper
509           'target_name': 'gles2_cmd_helper',
510           'type': 'static_library',
511           'includes': [
512             'gles2_cmd_helper.gypi',
513           ],
514           'dependencies': [
515             'command_buffer_client',
516           ],
517           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
518           'msvs_disabled_warnings': [4267, ],
519         },
520         {
521           # GN version: //gpu/command_buffer/client
522           'target_name': 'command_buffer_client',
523           'type': 'static_library',
524           'includes': [
525             'command_buffer_client.gypi',
526           ],
527           'dependencies': [
528             'command_buffer_common',
529           ],
530           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
531           'msvs_disabled_warnings': [4267, ],
532         },
533         {
534           # GN version: //gpu/command_buffer/service
535           'target_name': 'command_buffer_service',
536           'type': 'static_library',
537           'includes': [
538             'command_buffer_service.gypi',
539             '../build/android/increase_size_for_speed.gypi',
540             # Disable LTO due to ELF section name out of range
541             # crbug.com/422251
542             '../build/android/disable_gcc_lto.gypi',
543           ],
544           'dependencies': [
545             'command_buffer_common',
546             'disk_cache_proto',
547             'gpu_config',
548           ],
549           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
550           'msvs_disabled_warnings': [4267, ],
551         },
552         {
553           # GN version: //gpu/ipc
554           'target_name': 'gpu_ipc',
555           'type': 'static_library',
556           'includes': [
557             'gpu_ipc.gypi',
558           ],
559           'dependencies': [
560             'command_buffer_common',
561           ],
562         },
563         {
564           'target_name': 'gpu_config',
565           'type': 'static_library',
566           'includes': [
567             'gpu_config.gypi',
568           ],
569         },
570       ],
571     },
572     { # component != static_library
573       'targets': [
574          {
575           # GN version: //gpu/command_buffer/service:disk_cache_proto
576           'target_name': 'disk_cache_proto',
577           'type': 'static_library',
578           'sources': [ 'command_buffer/service/disk_cache_proto.proto' ],
579           'variables': {
580             'proto_in_dir': 'command_buffer/service',
581             'proto_out_dir': 'gpu/command_buffer/service',
582           },
583           'includes': [ '../build/protoc.gypi' ],
584         },
585         {
586           # GN version: //gpu
587           'target_name': 'gpu',
588           'type': 'shared_library',
589           'includes': [
590             'command_buffer_client.gypi',
591             'command_buffer_common.gypi',
592             'command_buffer_service.gypi',
593             'gles2_cmd_helper.gypi',
594             'gpu_config.gypi',
595             'gpu_ipc.gypi',
596             '../build/android/increase_size_for_speed.gypi',
597           ],
598           'defines': [
599             'GPU_IMPLEMENTATION',
600           ],
601           'sources': [
602             'gpu_export.h',
603           ],
604           'dependencies': [
605             '../base/base.gyp:base',
606             'command_buffer/command_buffer.gyp:gles2_utils',
607             'disk_cache_proto',
608           ],
609           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
610           'msvs_disabled_warnings': [4267, ],
611         },
612         {
613           # GN version: //gpu/command_buffer/common
614           'target_name': 'command_buffer_common',
615           'type': 'none',
616           'dependencies': [
617             'gpu',
618           ],
619         },
620         {
621           # Library helps make GLES2 command buffers.
622           # GN version: //gpu/command_buffer/client:gles2_cmd_helper
623           'target_name': 'gles2_cmd_helper',
624           'type': 'none',
625           'dependencies': [
626             'gpu',
627           ],
628           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
629           'msvs_disabled_warnings': [4267, ],
630         },
631         {
632           # GN version: //gpu/command_buffer/client
633           'target_name': 'command_buffer_client',
634           'type': 'none',
635           'dependencies': [
636             'gpu',
637           ],
638         },
639         {
640           # GN version: //gpu/command_buffer/service
641           'target_name': 'command_buffer_service',
642           'type': 'none',
643           'dependencies': [
644             'gpu',
645           ],
646         },
647         {
648           # GN version: //gpu/ipc
649           'target_name': 'gpu_ipc',
650           'type': 'none',
651           'dependencies': [
652             'gpu',
653           ],
654         },
655       ],
656     }],
657     ['disable_nacl!=1 and OS=="win" and target_arch=="ia32"', {
658       'targets': [
659         {
660           'target_name': 'command_buffer_common_win64',
661           'type': 'static_library',
662           'variables': {
663             'nacl_win64_target': 1,
664           },
665           'includes': [
666             'command_buffer_common.gypi',
667           ],
668           'dependencies': [
669             '../base/base.gyp:base_win64',
670           ],
671           'defines': [
672             '<@(nacl_win64_defines)',
673             'GPU_IMPLEMENTATION',
674           ],
675           'configurations': {
676             'Common_Base': {
677               'msvs_target_platform': 'x64',
678             },
679           },
680         },
681         {
682           'target_name': 'gpu_ipc_win64',
683           'type': 'static_library',
684           'variables': {
685             'nacl_win64_target': 1,
686           },
687           'includes': [
688             'gpu_ipc.gypi',
689           ],
690           'dependencies': [
691             '../base/base.gyp:base_win64',
692             '../ipc/ipc.gyp:ipc_win64',
693             'command_buffer_common_win64',
694           ],
695           'defines': [
696             '<@(nacl_win64_defines)',
697             'GPU_IMPLEMENTATION',
698           ],
699           'configurations': {
700             'Common_Base': {
701               'msvs_target_platform': 'x64',
702             },
703           },
704         },
705       ],
706     }],
707     ['OS == "android"', {
708       'targets': [
709         {
710           'target_name': 'gl_tests_apk',
711           'type': 'none',
712           'dependencies': [
713             'gl_tests',
714           ],
715           'variables': {
716             'test_suite_name': 'gl_tests',
717           },
718           'includes': [
719             '../build/apk_test.gypi',
720           ],
721         },
722         {
723           'target_name': 'gpu_unittests_apk',
724           'type': 'none',
725           'dependencies': [
726             'gpu_unittests',
727           ],
728           'variables': {
729             'test_suite_name': 'gpu_unittests',
730           },
731           'includes': [ '../build/apk_test.gypi' ],
732         },
733         {
734           'target_name': 'gpu_perftests_apk',
735           'type': 'none',
736           'dependencies': [
737             'gpu_perftests',
738           ],
739           'variables': {
740             'test_suite_name': 'gpu_perftests',
741           },
742           'includes': [ '../build/apk_test.gypi' ],
743         },
744       ],
745     }],
746     ['OS == "win" or (OS == "linux" and use_x11==1)', {
747       'targets': [
748         {
749           # TODO(crbug.com/519834): port this target to the GN build.
750           'target_name': 'angle_end2end_tests',
751           'type': '<(gtest_target_type)',
752           'dependencies': [
753             '../base/base.gyp:base',
754             '../base/base.gyp:test_support_base',
755           ],
756           'includes': [
757             '../third_party/angle/build/common_defines.gypi',
758             '../third_party/angle/src/tests/angle_end2end_tests.gypi',
759           ],
760           'sources': [
761             'angle_end2end_tests_main.cc',
762           ],
763         },
764       ],
765     }],
766     ['OS == "win"', {
767       'targets': [
768         {
769           # TODO(jmadill): port this target to the GN build.
770           'target_name': 'angle_perftests',
771           'type': '<(gtest_target_type)',
772           'dependencies': [
773             '../base/base.gyp:base',
774             '../base/base.gyp:test_support_base',
775           ],
776           'includes': [
777             '../third_party/angle/build/common_defines.gypi',
778             '../third_party/angle/src/tests/angle_perftests.gypi',
779           ],
780           'sources': [
781             'angle_perftests_main.cc',
782           ],
783         },
784       ],
785     }],
786     ['test_isolation_mode != "noop"', {
787       'targets': [
788         {
789           'target_name': 'gpu_unittests_run',
790           'type': 'none',
791           'dependencies': [
792             'gpu_unittests',
793           ],
794           'includes': [
795             '../build/isolate.gypi',
796           ],
797           'sources': [
798             'gpu_unittests.isolate',
799           ],
800           'conditions': [
801             ['use_x11==1',
802               {
803                 'dependencies': [
804                   '../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
805                 ],
806               }
807             ],
808           ],
809         },
810       ],
811     }],
812     ['(OS == "win" or OS == "linux") and archive_gpu_tests==1', {
813       'targets': [
814         {
815           # Only build dEQP on test configs. Note that dEQP is test-only code,
816           # and is only a part of the Chromium build to allow easy integration
817           # with the GPU bot waterfall. (Note that dEQP uses exceptions, and
818           # currently can't build with Clang on Windows)
819           'target_name': 'angle_deqp_gles2_tests',
820           'type': '<(gtest_target_type)',
821           'dependencies': [
822             '../base/base.gyp:base',
823             '../base/base.gyp:test_support_base',
824             '../third_party/angle/src/tests/tests.gyp:angle_deqp_gtest_support',
825             '../third_party/angle/src/tests/tests.gyp:angle_deqp_libgles2',
826           ],
827           'includes': [
828             '../third_party/angle/build/common_defines.gypi',
829           ],
830           'sources': [
831             'angle_deqp_tests_main.cc',
832           ],
833         },
834         {
835           'target_name': 'angle_deqp_gles3_tests',
836           'type': '<(gtest_target_type)',
837           'dependencies': [
838             '../base/base.gyp:base',
839             '../base/base.gyp:test_support_base',
840             '../third_party/angle/src/tests/tests.gyp:angle_deqp_gtest_support',
841             '../third_party/angle/src/tests/tests.gyp:angle_deqp_libgles3',
842           ],
843           'includes': [
844             '../third_party/angle/build/common_defines.gypi',
845           ],
846           'sources': [
847             'angle_deqp_tests_main.cc',
848           ],
849         },
850       ],
851     }]
852   ],