diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-29 20:54:24 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-29 20:54:24 +0000 |
commit | d05751a22809b045682aa91be4bc84e6a1f788a9 (patch) | |
tree | 7bed72a409a71f498b5cc69306c678a754b30059 /gpu | |
parent | 5298cc98317968c0fe2caf004e1a88d78a1ccd39 (diff) | |
download | chromium_src-d05751a22809b045682aa91be4bc84e6a1f788a9.zip chromium_src-d05751a22809b045682aa91be4bc84e6a1f788a9.tar.gz chromium_src-d05751a22809b045682aa91be4bc84e6a1f788a9.tar.bz2 |
Add CC to the GN build, work on GPU more
BUG=
R=jamesr@chromium.org
TBR=piman
Review URL: https://codereview.chromium.org/300973003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273588 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/BUILD.gn | 114 | ||||
-rw-r--r-- | gpu/command_buffer/client/BUILD.gn | 105 | ||||
-rw-r--r-- | gpu/config/BUILD.gn | 69 | ||||
-rw-r--r-- | gpu/skia_bindings/BUILD.gn | 14 |
4 files changed, 272 insertions, 30 deletions
diff --git a/gpu/BUILD.gn b/gpu/BUILD.gn index 7cc0549..b810a8a 100644 --- a/gpu/BUILD.gn +++ b/gpu/BUILD.gn @@ -13,9 +13,121 @@ # gpu.gyp:gles2_c_lib => //gpu/command_buffer/client:gles2_c_lib # # gpu.gyp:gles2_implementation => -# //gpu_command_buffer/client:gles2_implementation +# //gpu/command_buffer/client:gles2_implementation + +# gpu.gyp:gles2_implementation_client_side_arrays => +# //gpu/command_buffer/client:gles2_implementation_client_side_arrays +# +# 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.) + +component("gpu") { + deps = [ + "//gpu/command_buffer/client", + "//gpu/command_buffer/common", + "//gpu/command_buffer/service", + "//gpu/command_buffer/client:gles2_cmd_helper", + "//gpu/config", + "//gpu/ipc", + ] +} + +source_set("gpu_unittest_utils") { + sources = [ + "command_buffer/service/gles2_cmd_decoder_mock.cc", + "command_buffer/service/error_state_mock.cc", + "command_buffer/client/gles2_interface_stub.cc", + "command_buffer/client/gles2_interface_stub.h", + ] + + configs += [ "//third_party/khronos:khronos_headers" ] + + deps = [ + ":gpu", + "//testing/gmock", + "//testing/gtest", + "//ui/gl:gl_unittest_utils", + ] +} + +# TODO(GYP) This doesn't link yet. +if (false) { +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_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 = [ + "GLES2_C_LIB_IMPLEMENTATION", + "GL_GLEXT_PROTOTYPES", + ] + + deps = [ + ":gpu", + ":gpu_unittest_utils", + "//base", + "//base/third_party/dynamic_annotations", + "//testing/gmock", + "//testing/gtest", + # TODO(GYP) + #"<(angle_path)/src/build_angle.gyp:translator", + "//ui/gfx", + "//ui/gfx/geometry", + "//ui/gl", + #"//gpu/command_buffer/client", # These are all part of //gpu, needed? + #"//gpu/command_buffer/common", + #"//gpu/command_buffer/service", + #"//gpu/command_buffer/client:gles2_cmd_helper", + "//gpu/command_buffer/client:gles2_c_lib", + "//gpu/command_buffer/client:gles2_implementation_client_side_arrays", + ] + + # TODO(GYP) + # ['OS == "android"', { + # 'dependencies': [ + # '../testing/android/native_test.gyp:native_test_native_code', + # ], + # }], + # ['OS == "win"', { + # 'dependencies': [ + # '../third_party/angle/src/build_angle.gyp:libEGL', + # '../third_party/angle/src/build_angle.gyp:libGLESv2', + # ], + # }], +} +} # if (false) + +# TODO(GYP) +# gl_tests_apk +# gpu_unittests_apk diff --git a/gpu/command_buffer/client/BUILD.gn b/gpu/command_buffer/client/BUILD.gn index 910af3c..535bb49 100644 --- a/gpu/command_buffer/client/BUILD.gn +++ b/gpu/command_buffer/client/BUILD.gn @@ -52,36 +52,40 @@ gles2_c_lib_source_files = [ "gles2_lib.cc", ] +gles2_implementation_source_files = [ + "buffer_tracker.cc", + "buffer_tracker.h", + "client_context_state.h", + "client_context_state.cc", + "client_context_state_autogen.h", + "client_context_state_impl_autogen.h", + "gles2_impl_export.h", + "gles2_implementation_autogen.h", + "gles2_implementation.cc", + "gles2_implementation.h", + "gles2_implementation_impl_autogen.h", + "gles2_interface.h", + "gles2_trace_implementation_autogen.h", + "gles2_trace_implementation.cc", + "gles2_trace_implementation.h", + "gles2_trace_implementation_impl_autogen.h", + "gpu_memory_buffer_factory.h", + "gpu_memory_buffer_tracker.cc", + "gpu_memory_buffer_tracker.h", + "program_info_manager.cc", + "program_info_manager.h", + "query_tracker.cc", + "query_tracker.h", + "share_group.cc", + "share_group.h", + "vertex_array_object_manager.cc", + "vertex_array_object_manager.h", +] + +# Library emulates GLES2 using command_buffers. component("gles2_implementation") { - sources = [ - "buffer_tracker.cc", - "buffer_tracker.h", - "client_context_state.h", - "client_context_state.cc", - "client_context_state_autogen.h", - "client_context_state_impl_autogen.h", - "gles2_impl_export.h", - "gles2_implementation_autogen.h", - "gles2_implementation.cc", - "gles2_implementation.h", - "gles2_implementation_impl_autogen.h", - "gles2_interface.h", - "gles2_trace_implementation_autogen.h", - "gles2_trace_implementation.cc", - "gles2_trace_implementation.h", - "gles2_trace_implementation_impl_autogen.h", - "gpu_memory_buffer_factory.h", - "gpu_memory_buffer_tracker.cc", - "gpu_memory_buffer_tracker.h", - "program_info_manager.cc", - "program_info_manager.h", - "query_tracker.cc", - "query_tracker.h", - "share_group.cc", - "share_group.h", - "vertex_array_object_manager.cc", - "vertex_array_object_manager.h", - ] + sources = gles2_implementation_source_files + defines = [ "GLES2_IMPL_IMPLEMENTATION" ] all_dependent_configs = [ "//third_party/khronos:khronos_headers" ] @@ -99,6 +103,49 @@ component("gles2_implementation") { ] } +# Library emulates GLES2 using command_buffers. +component("gles2_implementation_client_side_arrays") { + sources = gles2_implementation_source_files + + defines = [ + "GLES2_IMPL_IMPLEMENTATION", + "GLES2_SUPPORT_CLIENT_SIDE_ARRAYS=1", + ] + all_dependent_configs = [ "//third_party/khronos:khronos_headers" ] + + if (is_win) { + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. + cflags = [ "/wd4267" ] # size_t to int truncation. + } + + deps = [ + ":gles2_cmd_helper", + "//base", + "//gpu/command_buffer/common", + "//ui/gfx/geometry", + "//ui/gl", + ] +} + +component("gl_in_process_context") { + sources = [ + "gl_in_process_context.h", + "gl_in_process_context.cc", + "gl_in_process_context_export.h", + ] + + defines = [ "GL_IN_PROCESS_CONTEXT_IMPLEMENTATION" ] + + deps = [ + ":gles2_implementation", + "//gpu", + "//base", + "//base/third_party/dynamic_annotations", + "//ui/gfx/geometry", + "//ui/gl", + ] +} + component("gles2_c_lib") { sources = gles2_c_lib_source_files defines = [ "GLES2_C_LIB_IMPLEMENTATION" ] diff --git a/gpu/config/BUILD.gn b/gpu/config/BUILD.gn new file mode 100644 index 0000000..9ace123 --- /dev/null +++ b/gpu/config/BUILD.gn @@ -0,0 +1,69 @@ +# 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. + +import("//build/config/ui.gni") + +source_set("config") { + sources = [ + "dx_diag_node.cc", + "dx_diag_node.h", + "gpu_blacklist.cc", + "gpu_blacklist.h", + "gpu_control_list_jsons.h", + "gpu_control_list.cc", + "gpu_control_list.h", + "gpu_driver_bug_list_json.cc", + "gpu_driver_bug_list.cc", + "gpu_driver_bug_list.h", + "gpu_driver_bug_workaround_type.h", + "gpu_dx_diagnostics_win.cc", + "gpu_feature_type.h", + "gpu_info.cc", + "gpu_info.h", + "gpu_info_collector_android.cc", + "gpu_info_collector_mac.mm", + "gpu_info_collector_ozone.cc", + "gpu_info_collector_win.cc", + "gpu_info_collector_x11.cc", + "gpu_info_collector.cc", + "gpu_info_collector.h", + "gpu_performance_stats.h", + "gpu_test_config.cc", + "gpu_test_config.h", + "gpu_test_expectations_parser.cc", + "gpu_test_expectations_parser.h", + "gpu_util.cc", + "gpu_util.h", + "software_rendering_list_json.cc", + ] + + deps = [ + "//base", + "//third_party/re2", + "//ui/gl", + ] + + if (is_win) { + deps += [ "//third_party/libxml" ] + libs = [ "dxguid.lib", "setupapi.lib" ] + + if (is_chrome_branded) { + sources += [ + "//third_party/amd/AmdCfxPxExt.h", + "//third_party/amd/amd_videocard_info_win.cc", + ] + } + } + if (is_linux && use_x11) { + configs += [ + "//build/config/linux:x11", + "//build/config/linux:xext", + ] + deps += [ + "//build/config/linux:libpci", + "//third_party/libXNVCtrl", + ] + } +} + diff --git a/gpu/skia_bindings/BUILD.gn b/gpu/skia_bindings/BUILD.gn new file mode 100644 index 0000000..2bd2a44 --- /dev/null +++ b/gpu/skia_bindings/BUILD.gn @@ -0,0 +1,14 @@ +# 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. + +source_set("skia_bindings") { + sources = [ + "gl_bindings_skia_cmd_buffer.cc", + "gl_bindings_skia_cmd_buffer.h", + ] + deps = [ + "//gpu/command_buffer/client:gles2_c_lib", + "//skia", + ] +} |