blob: c7f70eb7e5adc30e11db0457ee988a2e5ff0dd1d [file] [log] [blame]
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# GYP-to-GN project mappings:
#
# gpu.gyp:command_buffer_client => //gpu/command_buffer/client
#
# gpu.gyp:command_buffer_common => //gpu/command_buffer/common
#
# gpu.gyp:command_buffer_service => //gpu/command_buffer/service
# gpu/gpu.gyp:gl_in_process_context =>
# //gpu/command_buffer/client:gl_in_process_context
#
# gpu.gyp:gles2_cmd_helper => //gpu/command_buffer/client:gles2_cmd_helper
#
# gpu.gyp:gles2_c_lib => //gpu/command_buffer/client:gles2_c_lib
#
# gpu.gyp:gles2_implementation =>
# //gpu/command_buffer/client:gles2_implementation
#
# gpu.gyp:gpu_config => //gpu/config
#
# gpu.gyp:gpu_ipc => //gpu/ipc
#
# gpu.gyp:disk_cache_proto => //gpu/command_buffer/service:disk_cache_proto
#
# command_buffer/command_buffer.gyp:gles2_utils =>
# //gpu/command_buffer/common
# (Merged in to here because the separate file exists in GYP only to break
# a .gyp file dependency cycle which GN doesn't have.)
#
# gpu/skia_bindings/skia_bindings.gyp:gpu_skia_bindings => //gpu/skia_bindings
import("//testing/test.gni")
import("//build/config/ui.gni")
config("gpu_implementation") {
defines = [ "GPU_IMPLEMENTATION" ]
}
component("gpu") {
public_deps = [
"//gpu/command_buffer/client",
"//gpu/command_buffer/client:gles2_cmd_helper_sources",
"//gpu/command_buffer/common",
"//gpu/command_buffer/service",
"//gpu/config",
"//gpu/ipc",
]
}
source_set("test_support") {
testonly = true
sources = [
"command_buffer/client/gles2_interface_stub.cc",
"command_buffer/client/gles2_interface_stub.h",
"command_buffer/service/error_state_mock.cc",
"command_buffer/service/gles2_cmd_decoder_mock.cc",
]
configs += [ ":gpu_implementation" ]
public_deps = [
":gpu",
"//gpu/command_buffer/client:gles2_interface",
]
deps = [
"//testing/gmock",
"//testing/gtest",
"//ui/gl:gl_unittest_utils",
]
}
test("gl_tests") {
sources = [
"command_buffer/tests/compressed_texture_test.cc",
"command_buffer/tests/gl_bind_uniform_location_unittest.cc",
"command_buffer/tests/gl_chromium_framebuffer_multisample_unittest.cc",
"command_buffer/tests/gl_chromium_path_rendering_unittest.cc",
"command_buffer/tests/gl_clear_framebuffer_unittest.cc",
"command_buffer/tests/gl_copy_texture_CHROMIUM_unittest.cc",
"command_buffer/tests/gl_depth_texture_unittest.cc",
"command_buffer/tests/gl_gpu_memory_buffer_unittest.cc",
"command_buffer/tests/gl_lose_context_chromium_unittest.cc",
"command_buffer/tests/gl_manager.cc",
"command_buffer/tests/gl_manager.h",
"command_buffer/tests/gl_pointcoord_unittest.cc",
"command_buffer/tests/gl_program_unittest.cc",
"command_buffer/tests/gl_query_unittest.cc",
"command_buffer/tests/gl_readback_unittest.cc",
"command_buffer/tests/gl_shared_resources_unittest.cc",
"command_buffer/tests/gl_stream_draw_unittest.cc",
"command_buffer/tests/gl_test_utils.cc",
"command_buffer/tests/gl_test_utils.h",
"command_buffer/tests/gl_tests_main.cc",
"command_buffer/tests/gl_texture_mailbox_unittest.cc",
"command_buffer/tests/gl_texture_storage_unittest.cc",
"command_buffer/tests/gl_unittest.cc",
"command_buffer/tests/gl_unittests_android.cc",
"command_buffer/tests/gl_virtual_contexts_unittest.cc",
"command_buffer/tests/occlusion_query_unittest.cc",
]
defines = [ "GL_GLEXT_PROTOTYPES" ]
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
deps = [
":gpu",
":test_support",
"//base",
"//base/test:test_support",
"//base/third_party/dynamic_annotations",
"//testing/gmock",
"//testing/gtest",
"//third_party/angle:translator",
"//ui/gfx",
"//ui/gfx:test_support",
"//ui/gfx/geometry",
"//ui/gl",
"//gpu/command_buffer/common:gles2_utils",
"//gpu/command_buffer/client:gles2_c_lib",
"//gpu/command_buffer/client:gles2_implementation",
]
libs = []
if (is_android) {
deps += [ "//testing/android:native_test_native_code" ]
libs += [ "android" ]
}
# TODO(GYP)
# ['OS == "win"', {
# 'dependencies': [
# '../third_party/angle/src/build_angle.gyp:libEGL',
# '../third_party/angle/src/build_angle.gyp:libGLESv2',
# ],
# }],
}
test("gpu_unittests") {
sources = [
"command_buffer/client/buffer_tracker_unittest.cc",
"command_buffer/client/client_test_helper.cc",
"command_buffer/client/client_test_helper.h",
"command_buffer/client/cmd_buffer_helper_test.cc",
"command_buffer/client/fenced_allocator_test.cc",
"command_buffer/client/gles2_implementation_unittest.cc",
"command_buffer/client/mapped_memory_unittest.cc",
"command_buffer/client/program_info_manager_unittest.cc",
"command_buffer/client/query_tracker_unittest.cc",
"command_buffer/client/ring_buffer_test.cc",
"command_buffer/client/transfer_buffer_unittest.cc",
"command_buffer/client/vertex_array_object_manager_unittest.cc",
"command_buffer/common/bitfield_helpers_test.cc",
"command_buffer/common/command_buffer_mock.cc",
"command_buffer/common/command_buffer_mock.h",
"command_buffer/common/command_buffer_shared_test.cc",
"command_buffer/common/debug_marker_manager_unittest.cc",
"command_buffer/common/gles2_cmd_format_test.cc",
"command_buffer/common/gles2_cmd_format_test_autogen.h",
"command_buffer/common/gles2_cmd_utils_unittest.cc",
"command_buffer/common/id_allocator_test.cc",
"command_buffer/common/trace_event.h",
"command_buffer/common/unittest_main.cc",
"command_buffer/service/async_pixel_transfer_delegate_mock.cc",
"command_buffer/service/async_pixel_transfer_delegate_mock.h",
"command_buffer/service/async_pixel_transfer_manager_mock.cc",
"command_buffer/service/async_pixel_transfer_manager_mock.h",
"command_buffer/service/buffer_manager_unittest.cc",
"command_buffer/service/cmd_parser_test.cc",
"command_buffer/service/command_buffer_service_unittest.cc",
"command_buffer/service/common_decoder_unittest.cc",
"command_buffer/service/context_group_unittest.cc",
"command_buffer/service/feature_info_unittest.cc",
"command_buffer/service/framebuffer_manager_unittest.cc",
"command_buffer/service/gl_surface_mock.cc",
"command_buffer/service/gl_surface_mock.h",
"command_buffer/service/gles2_cmd_decoder_unittest.cc",
"command_buffer/service/gles2_cmd_decoder_unittest.h",
"command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h",
"command_buffer/service/gles2_cmd_decoder_unittest_1.cc",
"command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h",
"command_buffer/service/gles2_cmd_decoder_unittest_2.cc",
"command_buffer/service/gles2_cmd_decoder_unittest_2_autogen.h",
"command_buffer/service/gles2_cmd_decoder_unittest_3.cc",
"command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h",
"command_buffer/service/gles2_cmd_decoder_unittest_async_pixel.cc",
"command_buffer/service/gles2_cmd_decoder_unittest_attribs.cc",
"command_buffer/service/gles2_cmd_decoder_unittest_base.cc",
"command_buffer/service/gles2_cmd_decoder_unittest_base.h",
"command_buffer/service/gles2_cmd_decoder_unittest_buffers.cc",
"command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc",
"command_buffer/service/gles2_cmd_decoder_unittest_drawing.cc",
"command_buffer/service/gles2_cmd_decoder_unittest_extensions.cc",
"command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc",
"command_buffer/service/gles2_cmd_decoder_unittest_programs.cc",
"command_buffer/service/gles2_cmd_decoder_unittest_textures.cc",
"command_buffer/service/gles2_cmd_decoder_unittest_valuebuffer.cc",
"command_buffer/service/gpu_scheduler_unittest.cc",
"command_buffer/service/gpu_service_test.cc",
"command_buffer/service/gpu_service_test.h",
"command_buffer/service/gpu_tracer_unittest.cc",
"command_buffer/service/id_manager_unittest.cc",
"command_buffer/service/mailbox_manager_unittest.cc",
"command_buffer/service/memory_program_cache_unittest.cc",
"command_buffer/service/mocks.cc",
"command_buffer/service/mocks.h",
"command_buffer/service/program_cache_unittest.cc",
"command_buffer/service/program_manager_unittest.cc",
"command_buffer/service/query_manager_unittest.cc",
"command_buffer/service/renderbuffer_manager_unittest.cc",
"command_buffer/service/shader_manager_unittest.cc",
"command_buffer/service/shader_translator_cache_unittest.cc",
"command_buffer/service/shader_translator_unittest.cc",
"command_buffer/service/test_helper.cc",
"command_buffer/service/test_helper.h",
"command_buffer/service/texture_manager_unittest.cc",
"command_buffer/service/transfer_buffer_manager_unittest.cc",
"command_buffer/service/valuebuffer_manager_unittest.cc",
"command_buffer/service/vertex_array_manager_unittest.cc",
"command_buffer/service/vertex_attrib_manager_unittest.cc",
"config/gpu_blacklist_unittest.cc",
"config/gpu_control_list_entry_unittest.cc",
"config/gpu_control_list_number_info_unittest.cc",
"config/gpu_control_list_os_info_unittest.cc",
"config/gpu_control_list_unittest.cc",
"config/gpu_control_list_version_info_unittest.cc",
"config/gpu_driver_bug_list_unittest.cc",
"config/gpu_info_collector_unittest.cc",
"config/gpu_info_unittest.cc",
"config/gpu_test_config_unittest.cc",
"config/gpu_test_expectations_parser_unittest.cc",
"config/gpu_util_unittest.cc",
]
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
deps = [
":gpu",
":test_support",
"//base",
"//base/test:test_support",
"//base/third_party/dynamic_annotations",
"//testing/gmock",
"//testing/gtest",
"//third_party/angle:translator",
"//ui/gfx",
"//ui/gfx:test_support",
"//ui/gfx/geometry",
"//ui/gl",
"//gpu/command_buffer/common:gles2_utils",
"//gpu/command_buffer/client:gles2_c_lib",
"//gpu/command_buffer/client:gles2_implementation",
]
}
test("gpu_perftests") {
sources = [
"perftests/measurements.cc",
"perftests/run_all_tests.cc",
"perftests/texture_upload_perftest.cc",
]
deps = [
"//base",
"//base/test:test_support",
"//gpu/command_buffer/service",
"//testing/gmock",
"//testing/gtest",
"//testing/perf",
"//ui/gfx/geometry",
"//ui/gl",
]
}
test("angle_unittests") {
sources = [
"angle_unittest_main.cc",
]
deps = [
"//base",
"//base/test:test_support",
"//base/third_party/dynamic_annotations",
"//testing/gmock",
"//testing/gtest",
"//third_party/angle:translator_static",
]
}
if (is_linux && !is_chromeos && target_cpu != "arm" && use_x11) {
executable("compositor_model_bench") {
sources = [
"tools/compositor_model_bench/compositor_model_bench.cc",
"tools/compositor_model_bench/forward_render_model.cc",
"tools/compositor_model_bench/render_model_utils.cc",
"tools/compositor_model_bench/render_models.cc",
"tools/compositor_model_bench/render_tree.cc",
"tools/compositor_model_bench/shaders.cc",
]
libs = [ "GL" ]
configs += [ "//build/config/linux:x11" ]
deps = [
"//base",
"//ui/gl",
]
}
}