diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-16 19:34:34 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-16 19:34:34 +0000 |
commit | d26d8dd799ea9575bdd43829446af8548ff23a94 (patch) | |
tree | b1658c9a3fe7b640494e191d8cd56bb557cb1f76 /gpu | |
parent | 2354994eae6a4099f5cc03cf18513b29d219e9e2 (diff) | |
download | chromium_src-d26d8dd799ea9575bdd43829446af8548ff23a94.zip chromium_src-d26d8dd799ea9575bdd43829446af8548ff23a94.tar.gz chromium_src-d26d8dd799ea9575bdd43829446af8548ff23a94.tar.bz2 |
GN build: GPU work, Windows compile, "check" errors
Fix the "gn check" header errors.
Remove the extra "gles2_utils" target which "gn check" flags as an error. This target is actually inseparable from "command_buffer_common" but exists this way to prevent cycles in GYP files (but not GYP targets). GN doesn't have this problem, so I merged them.
Moved the GPU targets out into build files closer to their files (gpu/command_buffer/client and .../common). This leaves a BUILD.gn file in gpu/ with a comment listing the forwarding locations, since that's where people will look for a BUILD.gn file first.
Delete the duplicate gfx_unittests target, leave a comment for where it is in case somebody does a search for that name.
Make webp compile on Windows
Make ui/gfx compile on Windows. There were some duplicate symbols for ozone. I changed some of the filtering around to do += instead of exclusion. I think in these cases it's easier to follow and maintain.
BUG=
R=piman@chromium.org, urvang@google.com
Review URL: https://codereview.chromium.org/288033016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@271080 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/BUILD.gn | 158 | ||||
-rw-r--r-- | gpu/command_buffer/BUILD.gn | 17 | ||||
-rw-r--r-- | gpu/command_buffer/client/BUILD.gn | 119 | ||||
-rw-r--r-- | gpu/command_buffer/common/BUILD.gn | 42 | ||||
-rw-r--r-- | gpu/command_buffer/common/gles2_cmd_format.h | 1 |
5 files changed, 179 insertions, 158 deletions
diff --git a/gpu/BUILD.gn b/gpu/BUILD.gn index 4e2d47a..bb0baf2 100644 --- a/gpu/BUILD.gn +++ b/gpu/BUILD.gn @@ -2,144 +2,20 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -config("sizet_truncations") { - if (is_win) { - # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. - cflags = [ "/wd4267" ] # size_t to int truncation. - } -} - -gles2_c_lib_source_files = [ - "command_buffer/client/gles2_c_lib.cc", - "command_buffer/client/gles2_c_lib_autogen.h", - "command_buffer/client/gles2_c_lib_export.h", - "command_buffer/client/gles2_lib.h", - "command_buffer/client/gles2_lib.cc", -] - -component("gles2_implementation") { - sources = [ - "command_buffer/client/buffer_tracker.cc", - "command_buffer/client/buffer_tracker.h", - "command_buffer/client/client_context_state.h", - "command_buffer/client/client_context_state.cc", - "command_buffer/client/client_context_state_autogen.h", - "command_buffer/client/client_context_state_impl_autogen.h", - "command_buffer/client/gles2_impl_export.h", - "command_buffer/client/gles2_implementation_autogen.h", - "command_buffer/client/gles2_implementation.cc", - "command_buffer/client/gles2_implementation.h", - "command_buffer/client/gles2_implementation_impl_autogen.h", - "command_buffer/client/gles2_interface.h", - "command_buffer/client/gles2_trace_implementation_autogen.h", - "command_buffer/client/gles2_trace_implementation.cc", - "command_buffer/client/gles2_trace_implementation.h", - "command_buffer/client/gles2_trace_implementation_impl_autogen.h", - "command_buffer/client/gpu_memory_buffer_factory.h", - "command_buffer/client/gpu_memory_buffer_tracker.cc", - "command_buffer/client/gpu_memory_buffer_tracker.h", - "command_buffer/client/program_info_manager.cc", - "command_buffer/client/program_info_manager.h", - "command_buffer/client/query_tracker.cc", - "command_buffer/client/query_tracker.h", - "command_buffer/client/share_group.cc", - "command_buffer/client/share_group.h", - "command_buffer/client/vertex_array_object_manager.cc", - "command_buffer/client/vertex_array_object_manager.h", - ] - defines = [ "GLES2_IMPL_IMPLEMENTATION" ] - configs += [ ":sizet_truncations" ] - all_dependent_configs = [ "//third_party/khronos:khronos_headers" ] - - deps = [ - ":gles2_cmd_helper", - "//base", - "//gpu/command_buffer:gles2_utils", - "//ui/gfx/geometry", - "//ui/gl", - ] -} - -component("gles2_c_lib") { - sources = gles2_c_lib_source_files - defines = [ "GLES2_C_LIB_IMPLEMENTATION" ] - configs += [ ":sizet_truncations" ] - - deps = [ - ":command_buffer_client", - ":gles2_implementation", - "//base", - "//base/third_party/dynamic_annotations", - "//gpu/command_buffer:gles2_utils", - ] -} - -source_set("gles2_cmd_helper") { - sources = [ - "command_buffer/client/gles2_cmd_helper.cc", - "command_buffer/client/gles2_cmd_helper.h", - "command_buffer/client/gles2_cmd_helper_autogen.h", - ] - - configs += [ ":sizet_truncations" ] - deps = [ ":command_buffer_client" ] -} - -source_set("command_buffer_client") { - sources = [ - "command_buffer/client/cmd_buffer_helper.cc", - "command_buffer/client/cmd_buffer_helper.h", - "command_buffer/client/fenced_allocator.cc", - "command_buffer/client/fenced_allocator.h", - "command_buffer/client/gpu_control.h", - "command_buffer/client/mapped_memory.cc", - "command_buffer/client/mapped_memory.h", - "command_buffer/client/ring_buffer.cc", - "command_buffer/client/ring_buffer.h", - "command_buffer/client/transfer_buffer.cc", - "command_buffer/client/transfer_buffer.h", - ] - - configs += [ ":sizet_truncations" ] - all_dependent_configs = [ "//third_party/khronos:khronos_headers" ] - - deps = [ - ":command_buffer_common", - ] -} - -source_set("command_buffer_common") { - sources = [ - "command_buffer/common/bitfield_helpers.h", - "command_buffer/common/buffer.cc", - "command_buffer/common/buffer.h", - "command_buffer/common/capabilities.cc", - "command_buffer/common/capabilities.h", - "command_buffer/common/cmd_buffer_common.cc", - "command_buffer/common/cmd_buffer_common.h", - "command_buffer/common/command_buffer.h", - "command_buffer/common/constants.h", - "command_buffer/common/debug_marker_manager.cc", - "command_buffer/common/debug_marker_manager.h", - "command_buffer/common/gles2_cmd_format.cc", - "command_buffer/common/gles2_cmd_format.h", - "command_buffer/common/gles2_cmd_format_autogen.h", - "command_buffer/common/gles2_cmd_ids.h", - "command_buffer/common/gles2_cmd_ids_autogen.h", - "command_buffer/common/id_allocator.cc", - "command_buffer/common/id_allocator.h", - "command_buffer/common/mailbox.cc", - "command_buffer/common/mailbox.h", - "command_buffer/common/mailbox_holder.cc", - "command_buffer/common/mailbox_holder.h", - "command_buffer/common/thread_local.h", - "command_buffer/common/time.h", - ] - - all_dependent_configs = [ "//third_party/khronos:khronos_headers" ] - - deps = [ - "//base", - "//gpu/command_buffer:gles2_utils", - ] -} +# 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:gles2_cmd_helper => //gpu/command_buffer/client:gles2_cmd_helper +# +# gpu.gyp:gles2_c_lib => //gpu/command_buffer/client:cles2_c_lib +# +# gpu.gyp:gles2_implementation => +# //gpu_command_buffer/client:gles2_implementation +# +# 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.) diff --git a/gpu/command_buffer/BUILD.gn b/gpu/command_buffer/BUILD.gn deleted file mode 100644 index c37e90f..0000000 --- a/gpu/command_buffer/BUILD.gn +++ /dev/null @@ -1,17 +0,0 @@ -# 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. - -component("gles2_utils") { - sources = [ - "common/gles2_cmd_format.h", - "common/gles2_cmd_utils.cc", - "common/gles2_cmd_utils.h", - "common/gles2_utils_export.h", - ] - - defines = [ "GLES2_UTILS_IMPLEMENTATION" ] - all_dependent_configs = [ "//third_party/khronos:khronos_headers" ] - deps = [ "//base" ] -} - diff --git a/gpu/command_buffer/client/BUILD.gn b/gpu/command_buffer/client/BUILD.gn new file mode 100644 index 0000000..910af3c --- /dev/null +++ b/gpu/command_buffer/client/BUILD.gn @@ -0,0 +1,119 @@ +# Copyright (c) 2013 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("client") { + sources = [ + "cmd_buffer_helper.cc", + "cmd_buffer_helper.h", + "fenced_allocator.cc", + "fenced_allocator.h", + "gpu_control.h", + "mapped_memory.cc", + "mapped_memory.h", + "ring_buffer.cc", + "ring_buffer.h", + "transfer_buffer.cc", + "transfer_buffer.h", + ] + + if (is_win) { + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. + cflags = [ "/wd4267" ] # size_t to int truncation. + } + + all_dependent_configs = [ "//third_party/khronos:khronos_headers" ] + + deps = [ + "//gpu/command_buffer/common", + ] +} + +source_set("gles2_cmd_helper") { + sources = [ + "gles2_cmd_helper.cc", + "gles2_cmd_helper.h", + "gles2_cmd_helper_autogen.h", + ] + + if (is_win) { + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. + cflags = [ "/wd4267" ] # size_t to int truncation. + } + + deps = [ ":client" ] +} + +gles2_c_lib_source_files = [ + "gles2_c_lib.cc", + "gles2_c_lib_autogen.h", + "gles2_c_lib_export.h", + "gles2_lib.h", + "gles2_lib.cc", +] + +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", + ] + defines = [ "GLES2_IMPL_IMPLEMENTATION" ] + 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("gles2_c_lib") { + sources = gles2_c_lib_source_files + defines = [ "GLES2_C_LIB_IMPLEMENTATION" ] + + if (is_win) { + # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. + cflags = [ "/wd4267" ] # size_t to int truncation. + } + + deps = [ + ":client", + ":gles2_implementation", + "//base", + "//base/third_party/dynamic_annotations", + "//gpu/command_buffer/common", + ] +} + diff --git a/gpu/command_buffer/common/BUILD.gn b/gpu/command_buffer/common/BUILD.gn new file mode 100644 index 0000000..43b1940 --- /dev/null +++ b/gpu/command_buffer/common/BUILD.gn @@ -0,0 +1,42 @@ +# Copyright (c) 2013 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("common") { + sources = [ + "bitfield_helpers.h", + "buffer.cc", + "buffer.h", + "capabilities.cc", + "capabilities.h", + "cmd_buffer_common.cc", + "cmd_buffer_common.h", + "command_buffer.h", + "constants.h", + "debug_marker_manager.cc", + "debug_marker_manager.h", + "gles2_cmd_format.cc", + "gles2_cmd_format.h", + "gles2_cmd_format.h", + "gles2_cmd_format_autogen.h", + "gles2_cmd_ids.h", + "gles2_cmd_ids_autogen.h", + "gles2_cmd_utils.cc", + "gles2_cmd_utils.h", + "gles2_utils_export.h", + "id_allocator.cc", + "id_allocator.h", + "mailbox.cc", + "mailbox.h", + "mailbox_holder.cc", + "mailbox_holder.h", + "thread_local.h", + "time.h", + ] + + all_dependent_configs = [ "//third_party/khronos:khronos_headers" ] + + deps = [ + "//base", + ] +} diff --git a/gpu/command_buffer/common/gles2_cmd_format.h b/gpu/command_buffer/common/gles2_cmd_format.h index 79baf97..a541cbb 100644 --- a/gpu/command_buffer/common/gles2_cmd_format.h +++ b/gpu/command_buffer/common/gles2_cmd_format.h @@ -14,6 +14,7 @@ #include <string.h> #include "base/atomicops.h" +#include "base/logging.h" #include "base/macros.h" #include "gpu/command_buffer/common/bitfield_helpers.h" #include "gpu/command_buffer/common/cmd_buffer_common.h" |