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. 4 5 { 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 'target_name': 'gles2_implementation', 16 'type': '<(component)', 17 'dependencies': [ 18 '../base/base.gyp:base', 19 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', 20 '../third_party/khronos/khronos.gyp:khronos_headers', 21 '../ui/gl/gl.gyp:gl', 22 '../ui/gfx/gfx.gyp:gfx', 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 'command_buffer/client/gl_in_process_context.h', 32 'command_buffer/client/gl_in_process_context.cc', 33 ], 34 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 35 'msvs_disabled_warnings': [4267, ], 36 }, 37 { 38 # Library emulates GLES2 using command_buffers. 39 'target_name': 'gles2_implementation_client_side_arrays', 40 'type': '<(component)', 41 'defines': [ 42 'GLES2_IMPL_IMPLEMENTATION', 43 'GLES2_SUPPORT_CLIENT_SIDE_ARRAYS=1', 44 ], 45 'dependencies': [ 46 '../base/base.gyp:base', 47 '../third_party/khronos/khronos.gyp:khronos_headers', 48 '../ui/gl/gl.gyp:gl', 49 '../ui/gfx/gfx.gyp:gfx', 50 'command_buffer/command_buffer.gyp:gles2_utils', 51 'gles2_cmd_helper', 52 ], 53 'sources': [ 54 '<@(gles2_implementation_source_files)', 55 ], 56 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 57 'msvs_disabled_warnings': [ 4267, ], 58 }, 59 { 60 # Library emulates GLES2 using command_buffers. 61 'target_name': 'gles2_implementation_client_side_arrays_no_check', 62 'type': '<(component)', 63 'defines': [ 64 'GLES2_IMPL_IMPLEMENTATION', 65 'GLES2_SUPPORT_CLIENT_SIDE_ARRAYS=1', 66 'GLES2_CONFORMANCE_TESTS=1', 67 ], 68 'dependencies': [ 69 '../base/base.gyp:base', 70 '../third_party/khronos/khronos.gyp:khronos_headers', 71 '../ui/gfx/gfx.gyp:gfx', 72 'command_buffer/command_buffer.gyp:gles2_utils', 73 'gles2_cmd_helper', 74 ], 75 'sources': [ 76 '<@(gles2_implementation_source_files)', 77 ], 78 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 79 'msvs_disabled_warnings': [ 4267, ], 80 }, 81 { 82 # Stub to expose gles2_implemenation in C instead of C++. 83 # so GLES2 C programs can work with no changes. 84 'target_name': 'gles2_c_lib', 85 'type': '<(component)', 86 'dependencies': [ 87 '../base/base.gyp:base', 88 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', 89 'command_buffer/command_buffer.gyp:gles2_utils', 90 'command_buffer_client', 91 'gles2_implementation', 92 ], 93 'defines': [ 94 'GLES2_C_LIB_IMPLEMENTATION', 95 ], 96 'sources': [ 97 '<@(gles2_c_lib_source_files)', 98 ], 99 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 100 'msvs_disabled_warnings': [4267, ], 101 }, 102 { 103 # Same as gles2_c_lib except with no parameter checking. Required for 104 # OpenGL ES 2.0 conformance tests. 105 'target_name': 'gles2_c_lib_nocheck', 106 'type': '<(component)', 107 'defines': [ 108 'GLES2_C_LIB_IMPLEMENTATION', 109 'GLES2_CONFORMANCE_TESTS=1', 110 ], 111 'dependencies': [ 112 '../base/base.gyp:base', 113 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', 114 'command_buffer/command_buffer.gyp:gles2_utils', 115 'command_buffer_client', 116 'gles2_implementation_client_side_arrays_no_check', 117 ], 118 'sources': [ 119 '<@(gles2_c_lib_source_files)', 120 ], 121 }, 122 { 123 'target_name': 'angle_unittests', 124 'type': '<(gtest_target_type)', 125 'dependencies': [ 126 '../base/base.gyp:base', 127 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', 128 '../testing/gmock.gyp:gmock', 129 '../testing/gtest.gyp:gtest', 130 '<(angle_path)/src/build_angle.gyp:translator_static', 131 ], 132 'variables': { 133 'ANGLE_DIR': '<(angle_path)', 134 }, 135 'includes': [ 136 '../third_party/angle/tests/preprocessor_tests/preprocessor_tests.gypi', 137 '../third_party/angle/tests/compiler_tests/compiler_tests.gypi', 138 ], 139 'include_dirs': [ 140 '..', 141 '<(angle_path)/include', 142 '<(angle_path)/src', 143 '<(angle_path)/src/compiler/preprocessor', 144 '<(angle_path)/tests', 145 ], 146 'sources': [ 147 'angle_unittest_main.cc', 148 ], 149 }, 150 { 151 'target_name': 'gpu_unittests', 152 'type': '<(gtest_target_type)', 153 'dependencies': [ 154 '../base/base.gyp:base', 155 '../base/base.gyp:test_support_base', 156 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', 157 '../testing/gmock.gyp:gmock', 158 '../testing/gtest.gyp:gtest', 159 '<(angle_path)/src/build_angle.gyp:translator', 160 '../ui/gl/gl.gyp:gl', 161 '../ui/gfx/gfx.gyp:gfx', 162 'command_buffer/command_buffer.gyp:gles2_utils', 163 'command_buffer_client', 164 'command_buffer_common', 165 'command_buffer_service', 166 'gpu', 167 'gpu_unittest_utils', 168 'gles2_implementation_client_side_arrays', 169 'gles2_cmd_helper', 170 ], 171 'defines': [ 172 'GLES2_C_LIB_IMPLEMENTATION', 173 ], 174 'sources': [ 175 '<@(gles2_c_lib_source_files)', 176 'command_buffer/client/buffer_tracker_unittest.cc', 177 'command_buffer/client/client_test_helper.cc', 178 'command_buffer/client/client_test_helper.h', 179 'command_buffer/client/cmd_buffer_helper_test.cc', 180 'command_buffer/client/fenced_allocator_test.cc', 181 'command_buffer/client/gles2_implementation_unittest.cc', 182 'command_buffer/client/mapped_memory_unittest.cc', 183 'command_buffer/client/query_tracker_unittest.cc', 184 'command_buffer/client/program_info_manager_unittest.cc', 185 'command_buffer/client/ring_buffer_test.cc', 186 'command_buffer/client/transfer_buffer_unittest.cc', 187 'command_buffer/client/vertex_array_object_manager_unittest.cc', 188 'command_buffer/common/bitfield_helpers_test.cc', 189 'command_buffer/common/command_buffer_mock.cc', 190 'command_buffer/common/command_buffer_mock.h', 191 'command_buffer/common/command_buffer_shared_test.cc', 192 'command_buffer/common/debug_marker_manager_unittest.cc', 193 'command_buffer/common/gles2_cmd_format_test.cc', 194 'command_buffer/common/gles2_cmd_format_test_autogen.h', 195 'command_buffer/common/gles2_cmd_utils_unittest.cc', 196 'command_buffer/common/id_allocator_test.cc', 197 'command_buffer/common/trace_event.h', 198 'command_buffer/common/unittest_main.cc', 199 'command_buffer/service/async_pixel_transfer_delegate_mock.h', 200 'command_buffer/service/async_pixel_transfer_delegate_mock.cc', 201 'command_buffer/service/async_pixel_transfer_manager_mock.h', 202 'command_buffer/service/async_pixel_transfer_manager_mock.cc', 203 'command_buffer/service/buffer_manager_unittest.cc', 204 'command_buffer/service/cmd_parser_test.cc', 205 'command_buffer/service/command_buffer_service_unittest.cc', 206 'command_buffer/service/common_decoder_unittest.cc', 207 'command_buffer/service/context_group_unittest.cc', 208 'command_buffer/service/feature_info_unittest.cc', 209 'command_buffer/service/framebuffer_manager_unittest.cc', 210 'command_buffer/service/gles2_cmd_decoder_unittest.cc', 211 'command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h', 212 'command_buffer/service/gles2_cmd_decoder_unittest_1.cc', 213 'command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h', 214 'command_buffer/service/gles2_cmd_decoder_unittest_2.cc', 215 'command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h', 216 'command_buffer/service/gles2_cmd_decoder_unittest_3.cc', 217 'command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h', 218 'command_buffer/service/gles2_cmd_decoder_unittest_base.cc', 219 'command_buffer/service/gles2_cmd_decoder_unittest_base.h', 220 'command_buffer/service/gl_surface_mock.cc', 221 'command_buffer/service/gl_surface_mock.h', 222 'command_buffer/service/gpu_scheduler_unittest.cc', 223 'command_buffer/service/id_manager_unittest.cc', 224 'command_buffer/service/mailbox_manager_unittest.cc', 225 'command_buffer/service/memory_program_cache_unittest.cc', 226 'command_buffer/service/mocks.cc', 227 'command_buffer/service/mocks.h', 228 'command_buffer/service/program_manager_unittest.cc', 229 'command_buffer/service/query_manager_unittest.cc', 230 'command_buffer/service/renderbuffer_manager_unittest.cc', 231 'command_buffer/service/program_cache_unittest.cc', 232 'command_buffer/service/shader_manager_unittest.cc', 233 'command_buffer/service/shader_translator_unittest.cc', 234 'command_buffer/service/stream_texture_mock.cc', 235 'command_buffer/service/stream_texture_mock.h', 236 'command_buffer/service/stream_texture_manager_mock.cc', 237 'command_buffer/service/stream_texture_manager_mock.h', 238 'command_buffer/service/test_helper.cc', 239 'command_buffer/service/test_helper.h', 240 'command_buffer/service/texture_manager_unittest.cc', 241 'command_buffer/service/transfer_buffer_manager_unittest.cc', 242 'command_buffer/service/vertex_attrib_manager_unittest.cc', 243 'command_buffer/service/vertex_array_manager_unittest.cc', 244 'config/gpu_blacklist_unittest.cc', 245 'config/gpu_control_list_entry_unittest.cc', 246 'config/gpu_control_list_machine_model_info_unittest.cc', 247 'config/gpu_control_list_number_info_unittest.cc', 248 'config/gpu_control_list_os_info_unittest.cc', 249 'config/gpu_control_list_string_info_unittest.cc', 250 'config/gpu_control_list_unittest.cc', 251 'config/gpu_control_list_version_info_unittest.cc', 252 'config/gpu_driver_bug_list_unittest.cc', 253 'config/gpu_info_collector_unittest.cc', 254 'config/gpu_info_unittest.cc', 255 'config/gpu_test_config_unittest.cc', 256 'config/gpu_test_expectations_parser_unittest.cc', 257 'config/gpu_util_unittest.cc', 258 ], 259 'conditions': [ 260 ['OS == "android" and gtest_target_type == "shared_library"', { 261 'dependencies': [ 262 '../testing/android/native_test.gyp:native_test_native_code', 263 ], 264 }], 265 # See http://crbug.com/162998#c4 for why this is needed. 266 ['OS=="linux" and linux_use_tcmalloc==1', { 267 'dependencies': [ 268 '../base/allocator/allocator.gyp:allocator', 269 ], 270 }], 271 ], 272 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 273 'msvs_disabled_warnings': [ 4267, ], 274 }, 275 { 276 'target_name': 'gl_tests', 277 'type': '<(gtest_target_type)', 278 'dependencies': [ 279 '../base/base.gyp:base', 280 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', 281 '../testing/gmock.gyp:gmock', 282 '../testing/gtest.gyp:gtest', 283 '<(angle_path)/src/build_angle.gyp:translator', 284 '../ui/gfx/gfx.gyp:gfx', 285 'command_buffer/command_buffer.gyp:gles2_utils', 286 'command_buffer_client', 287 'command_buffer_common', 288 'command_buffer_service', 289 'gpu', 290 'gpu_unittest_utils', 291 'gles2_implementation_client_side_arrays', 292 'gles2_cmd_helper', 293 #'gl_unittests', 294 ], 295 'defines': [ 296 'GLES2_C_LIB_IMPLEMENTATION', 297 'GL_GLEXT_PROTOTYPES', 298 ], 299 'sources': [ 300 '<@(gles2_c_lib_source_files)', 301 'command_buffer/tests/compressed_texture_test.cc', 302 'command_buffer/tests/gl_bind_uniform_location_unittest.cc', 303 'command_buffer/tests/gl_chromium_framebuffer_multisample_unittest.cc', 304 'command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc', 305 'command_buffer/tests/gl_depth_texture_unittest.cc', 306 'command_buffer/tests/gl_gpu_memory_buffer_unittests.cc', 307 'command_buffer/tests/gl_lose_context_chromium_unittests.cc', 308 'command_buffer/tests/gl_manager.cc', 309 'command_buffer/tests/gl_manager.h', 310 'command_buffer/tests/gl_pointcoord_unittest.cc', 311 'command_buffer/tests/gl_program_unittests.cc', 312 'command_buffer/tests/gl_query_unittests.cc', 313 'command_buffer/tests/gl_readback_unittests.cc', 314 'command_buffer/tests/gl_shared_resources_unittests.cc', 315 'command_buffer/tests/gl_stream_draw_unittests.cc', 316 'command_buffer/tests/gl_test_utils.cc', 317 'command_buffer/tests/gl_test_utils.h', 318 'command_buffer/tests/gl_tests_main.cc', 319 'command_buffer/tests/gl_texture_mailbox_unittests.cc', 320 'command_buffer/tests/gl_texture_storage_unittests.cc', 321 'command_buffer/tests/gl_unittests.cc', 322 'command_buffer/tests/gl_unittests_android.cc', 323 'command_buffer/tests/gl_virtual_contexts_unittests.cc', 324 'command_buffer/tests/occlusion_query_unittests.cc', 325 ], 326 'conditions': [ 327 ['OS == "android" and gtest_target_type == "shared_library"', { 328 'dependencies': [ 329 '../testing/android/native_test.gyp:native_test_native_code', 330 ], 331 }], 332 ], 333 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 334 'msvs_disabled_warnings': [ 4267, ], 335 }, 336 { 337 'target_name': 'gpu_unittest_utils', 338 'type': 'static_library', 339 'dependencies': [ 340 '../testing/gmock.gyp:gmock', 341 '../testing/gtest.gyp:gtest', 342 '../third_party/khronos/khronos.gyp:khronos_headers', 343 '../ui/gl/gl.gyp:gl_unittest_utils', 344 'gpu', 345 ], 346 'include_dirs': [ 347 '..', 348 ], 349 'sources': [ 350 'command_buffer/service/gles2_cmd_decoder_mock.cc', 351 'command_buffer/service/error_state_mock.cc', 352 'command_buffer/client/gles2_interface_stub.cc', 353 'command_buffer/client/gles2_interface_stub.h', 354 ], 355 }, 356 ], 357 'conditions': [ 358 ['component=="static_library"', { 359 'targets': [ 360 { 361 'target_name': 'disk_cache_proto', 362 'type': 'static_library', 363 'sources': [ 'command_buffer/service/disk_cache_proto.proto' ], 364 'variables': { 365 'proto_in_dir': 'command_buffer/service', 366 'proto_out_dir': 'gpu/command_buffer/service', 367 }, 368 'includes': [ '../build/protoc.gypi' ], 369 }, 370 { 371 'target_name': 'gpu', 372 'type': 'none', 373 'dependencies': [ 374 'command_buffer_client', 375 'command_buffer_common', 376 'command_buffer_service', 377 'gles2_cmd_helper', 378 'gpu_config', 379 'gpu_ipc', 380 ], 381 'sources': [ 382 'gpu_export.h', 383 ], 384 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 385 'msvs_disabled_warnings': [4267, ], 386 }, 387 { 388 'target_name': 'command_buffer_common', 389 'type': 'static_library', 390 'includes': [ 391 'command_buffer_common.gypi', 392 ], 393 'dependencies': [ 394 '../base/base.gyp:base', 395 'command_buffer/command_buffer.gyp:gles2_utils', 396 ], 397 'export_dependent_settings': [ 398 '../base/base.gyp:base', 399 ], 400 }, 401 { 402 # Library helps make GLES2 command buffers. 403 'target_name': 'gles2_cmd_helper', 404 'type': 'static_library', 405 'includes': [ 406 'gles2_cmd_helper.gypi', 407 ], 408 'dependencies': [ 409 'command_buffer_client', 410 ], 411 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 412 'msvs_disabled_warnings': [4267, ], 413 }, 414 { 415 'target_name': 'command_buffer_client', 416 'type': 'static_library', 417 'includes': [ 418 'command_buffer_client.gypi', 419 ], 420 'dependencies': [ 421 'command_buffer_common', 422 ], 423 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 424 'msvs_disabled_warnings': [4267, ], 425 }, 426 { 427 'target_name': 'command_buffer_service', 428 'type': 'static_library', 429 'includes': [ 430 'command_buffer_service.gypi', 431 ], 432 'dependencies': [ 433 'command_buffer_common', 434 'disk_cache_proto', 435 ], 436 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 437 'msvs_disabled_warnings': [4267, ], 438 }, 439 { 440 'target_name': 'gpu_ipc', 441 'type': 'static_library', 442 'includes': [ 443 'gpu_ipc.gypi', 444 ], 445 'dependencies': [ 446 'command_buffer_common', 447 ], 448 }, 449 { 450 'target_name': 'gpu_config', 451 'type': 'static_library', 452 'includes': [ 453 'gpu_config.gypi', 454 ], 455 }, 456 ], 457 }, 458 { # component != static_library 459 'targets': [ 460 { 461 'target_name': 'disk_cache_proto', 462 'type': 'static_library', 463 'sources': [ 'command_buffer/service/disk_cache_proto.proto' ], 464 'variables': { 465 'proto_in_dir': 'command_buffer/service', 466 'proto_out_dir': 'gpu/command_buffer/service', 467 }, 468 'includes': [ '../build/protoc.gypi' ], 469 }, 470 { 471 'target_name': 'gpu', 472 'type': 'shared_library', 473 'includes': [ 474 'command_buffer_client.gypi', 475 'command_buffer_common.gypi', 476 'command_buffer_service.gypi', 477 'gles2_cmd_helper.gypi', 478 'gpu_config.gypi', 479 'gpu_ipc.gypi', 480 ], 481 'defines': [ 482 'GPU_IMPLEMENTATION', 483 ], 484 'sources': [ 485 'gpu_export.h', 486 ], 487 'dependencies': [ 488 '../base/base.gyp:base', 489 'command_buffer/command_buffer.gyp:gles2_utils', 490 'disk_cache_proto', 491 ], 492 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 493 'msvs_disabled_warnings': [4267, ], 494 }, 495 { 496 'target_name': 'command_buffer_common', 497 'type': 'none', 498 'dependencies': [ 499 'gpu', 500 ], 501 }, 502 { 503 # Library helps make GLES2 command buffers. 504 'target_name': 'gles2_cmd_helper', 505 'type': 'none', 506 'dependencies': [ 507 'gpu', 508 ], 509 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 510 'msvs_disabled_warnings': [4267, ], 511 }, 512 { 513 'target_name': 'command_buffer_client', 514 'type': 'none', 515 'dependencies': [ 516 'gpu', 517 ], 518 }, 519 { 520 'target_name': 'command_buffer_service', 521 'type': 'none', 522 'dependencies': [ 523 'gpu', 524 ], 525 }, 526 { 527 'target_name': 'gpu_ipc', 528 'type': 'none', 529 'dependencies': [ 530 'gpu', 531 ], 532 }, 533 ], 534 }], 535 ['disable_nacl!=1 and OS=="win" and target_arch=="ia32"', { 536 'targets': [ 537 { 538 'target_name': 'gpu_ipc_win64', 539 'type': 'static_library', 540 'variables': { 541 'nacl_win64_target': 1, 542 }, 543 'includes': [ 544 'gpu_ipc.gypi', 545 ], 546 'dependencies': [ 547 '../base/base.gyp:base_nacl_win64', 548 '../ipc/ipc.gyp:ipc_win64', 549 ], 550 'defines': [ 551 '<@(nacl_win64_defines)', 552 'GPU_IMPLEMENTATION', 553 ], 554 'configurations': { 555 'Common_Base': { 556 'msvs_target_platform': 'x64', 557 }, 558 }, 559 }, 560 ], 561 }], 562 ['OS == "android" and gtest_target_type == "shared_library"', { 563 'targets': [ 564 { 565 'target_name': 'gl_tests_apk', 566 'type': 'none', 567 'dependencies': [ 568 'gl_tests', 569 ], 570 'variables': { 571 'test_suite_name': 'gl_tests', 572 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)gl_tests<(SHARED_LIB_SUFFIX)', 573 }, 574 'includes': [ 575 '../build/apk_test.gypi', 576 ], 577 }, 578 ], 579 }], 580 ], 581 } 582