diff options
author | jbroman <jbroman@chromium.org> | 2014-09-15 18:04:24 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-16 01:05:39 +0000 |
commit | cba3d2fec7493eeb9a22d712be62969299750c55 (patch) | |
tree | 7033e0f366053d791d3dea72e1d47b99c2e6a60a /gpu | |
parent | 753f06ff55b91b8ff39352e8bf87cbbbd2d695f4 (diff) | |
download | chromium_src-cba3d2fec7493eeb9a22d712be62969299750c55.zip chromium_src-cba3d2fec7493eeb9a22d712be62969299750c55.tar.gz chromium_src-cba3d2fec7493eeb9a22d712be62969299750c55.tar.bz2 |
GN: Create a :gles2_interface target to resolve some check errors in //cc.
gles2_interface.h defines a pure virtual interface; targets which use it should
depend on it, but not necessarily on an implementation target. Consequently,
a //gpu/command_buffer/client:gles2_interface target was created to reflect the
dependency on this interface without linking a particular implementation.
This resolves an issue with //cc trying to use this header without having a
dependency on a target which includes it.
Review URL: https://codereview.chromium.org/464153002
Cr-Commit-Position: refs/heads/master@{#294956}
Diffstat (limited to 'gpu')
-rw-r--r-- | gpu/BUILD.gn | 6 | ||||
-rw-r--r-- | gpu/command_buffer/client/BUILD.gn | 15 |
2 files changed, 18 insertions, 3 deletions
diff --git a/gpu/BUILD.gn b/gpu/BUILD.gn index 531a9da..c6c8e27 100644 --- a/gpu/BUILD.gn +++ b/gpu/BUILD.gn @@ -56,14 +56,16 @@ source_set("test_support") { "command_buffer/client/gles2_interface_stub.h", ] - configs += [ "//third_party/khronos:khronos_headers" ] - deps = [ ":gpu", + "//gpu/command_buffer/client:gles2_interface", "//testing/gmock", "//testing/gtest", "//ui/gl:gl_unittest_utils", ] + forward_dependent_configs_from = [ + "//gpu/command_buffer/client:gles2_interface", + ] } test("gl_tests") { diff --git a/gpu/command_buffer/client/BUILD.gn b/gpu/command_buffer/client/BUILD.gn index d3e9b42..11191ea 100644 --- a/gpu/command_buffer/client/BUILD.gn +++ b/gpu/command_buffer/client/BUILD.gn @@ -77,7 +77,6 @@ gles2_implementation_source_files = [ "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", @@ -95,6 +94,17 @@ gles2_implementation_source_files = [ "vertex_array_object_manager.h", ] +# Provides GLES2 interface, but does not cause any implementation to be linked +# in. Useful when a target uses the interface, but permits its users to choose +# an implementation. +source_set("gles2_interface") { + sources = [ "gles2_interface.h" ] + direct_dependent_configs = [ "//third_party/khronos:khronos_headers" ] + deps = [ + "//base", + ] +} + # Library emulates GLES2 using command_buffers. component("gles2_implementation") { sources = gles2_implementation_source_files @@ -109,6 +119,7 @@ component("gles2_implementation") { deps = [ ":gles2_cmd_helper", + ":gles2_interface", "//base", "//gpu/command_buffer/common", "//ui/gfx/geometry", @@ -133,6 +144,7 @@ component("gles2_implementation_client_side_arrays") { deps = [ ":gles2_cmd_helper", + ":gles2_interface", "//base", "//gpu/command_buffer/common", "//ui/gfx/geometry", @@ -171,6 +183,7 @@ component("gles2_c_lib") { deps = [ ":client", + ":gles2_interface", "//base", "//base/third_party/dynamic_annotations", "//gpu/command_buffer/common", |