Commit cba3d2fe authored by jbroman's avatar jbroman Committed by Commit bot

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}
parent 753f06ff
...@@ -478,6 +478,7 @@ component("cc") { ...@@ -478,6 +478,7 @@ component("cc") {
"//base", "//base",
"//base/third_party/dynamic_annotations", "//base/third_party/dynamic_annotations",
"//gpu", "//gpu",
"//gpu/command_buffer/client:gles2_interface",
"//media", "//media",
"//skia", "//skia",
"//ui/events:events_base", "//ui/events:events_base",
...@@ -642,6 +643,10 @@ source_set("test_support") { ...@@ -642,6 +643,10 @@ source_set("test_support") {
if (!is_android) { # TODO(GYP) Enable on Android when osmesa links. if (!is_android) { # TODO(GYP) Enable on Android when osmesa links.
deps += [ "//third_party/mesa:osmesa" ] deps += [ "//third_party/mesa:osmesa" ]
} }
forward_dependent_configs_from = [
"//gpu:test_support",
]
} }
test("cc_unittests") { test("cc_unittests") {
...@@ -775,6 +780,7 @@ test("cc_unittests") { ...@@ -775,6 +780,7 @@ test("cc_unittests") {
"//cc/surfaces", "//cc/surfaces",
"//gpu", "//gpu",
"//gpu:test_support", "//gpu:test_support",
"//gpu/command_buffer/client:gles2_interface",
"//gpu/command_buffer/common:gles2_utils", "//gpu/command_buffer/common:gles2_utils",
"//media", "//media",
"//testing/gmock", "//testing/gmock",
......
...@@ -28,6 +28,7 @@ source_set("common") { ...@@ -28,6 +28,7 @@ source_set("common") {
"//base", "//base",
"//build/util:webkit_version", "//build/util:webkit_version",
"//components/tracing", "//components/tracing",
"//gpu/command_buffer/client:gles2_interface",
"//gpu/command_buffer/common", "//gpu/command_buffer/common",
"//net", "//net",
"//skia", "//skia",
......
...@@ -32,6 +32,7 @@ source_set("renderer") { ...@@ -32,6 +32,7 @@ source_set("renderer") {
"//content/public/common:common_sources", "//content/public/common:common_sources",
"//gin", "//gin",
"//gpu", "//gpu",
"//gpu/command_buffer/client:gles2_interface",
"//jingle:jingle_glue", "//jingle:jingle_glue",
"//media", "//media",
"//media/blink", "//media/blink",
......
...@@ -56,14 +56,16 @@ source_set("test_support") { ...@@ -56,14 +56,16 @@ source_set("test_support") {
"command_buffer/client/gles2_interface_stub.h", "command_buffer/client/gles2_interface_stub.h",
] ]
configs += [ "//third_party/khronos:khronos_headers" ]
deps = [ deps = [
":gpu", ":gpu",
"//gpu/command_buffer/client:gles2_interface",
"//testing/gmock", "//testing/gmock",
"//testing/gtest", "//testing/gtest",
"//ui/gl:gl_unittest_utils", "//ui/gl:gl_unittest_utils",
] ]
forward_dependent_configs_from = [
"//gpu/command_buffer/client:gles2_interface",
]
} }
test("gl_tests") { test("gl_tests") {
......
...@@ -77,7 +77,6 @@ gles2_implementation_source_files = [ ...@@ -77,7 +77,6 @@ gles2_implementation_source_files = [
"gles2_implementation.cc", "gles2_implementation.cc",
"gles2_implementation.h", "gles2_implementation.h",
"gles2_implementation_impl_autogen.h", "gles2_implementation_impl_autogen.h",
"gles2_interface.h",
"gles2_trace_implementation_autogen.h", "gles2_trace_implementation_autogen.h",
"gles2_trace_implementation.cc", "gles2_trace_implementation.cc",
"gles2_trace_implementation.h", "gles2_trace_implementation.h",
...@@ -95,6 +94,17 @@ gles2_implementation_source_files = [ ...@@ -95,6 +94,17 @@ gles2_implementation_source_files = [
"vertex_array_object_manager.h", "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. # Library emulates GLES2 using command_buffers.
component("gles2_implementation") { component("gles2_implementation") {
sources = gles2_implementation_source_files sources = gles2_implementation_source_files
...@@ -109,6 +119,7 @@ component("gles2_implementation") { ...@@ -109,6 +119,7 @@ component("gles2_implementation") {
deps = [ deps = [
":gles2_cmd_helper", ":gles2_cmd_helper",
":gles2_interface",
"//base", "//base",
"//gpu/command_buffer/common", "//gpu/command_buffer/common",
"//ui/gfx/geometry", "//ui/gfx/geometry",
...@@ -133,6 +144,7 @@ component("gles2_implementation_client_side_arrays") { ...@@ -133,6 +144,7 @@ component("gles2_implementation_client_side_arrays") {
deps = [ deps = [
":gles2_cmd_helper", ":gles2_cmd_helper",
":gles2_interface",
"//base", "//base",
"//gpu/command_buffer/common", "//gpu/command_buffer/common",
"//ui/gfx/geometry", "//ui/gfx/geometry",
...@@ -171,6 +183,7 @@ component("gles2_c_lib") { ...@@ -171,6 +183,7 @@ component("gles2_c_lib") {
deps = [ deps = [
":client", ":client",
":gles2_interface",
"//base", "//base",
"//base/third_party/dynamic_annotations", "//base/third_party/dynamic_annotations",
"//gpu/command_buffer/common", "//gpu/command_buffer/common",
......
...@@ -16,6 +16,7 @@ shared_library("sample_app") { ...@@ -16,6 +16,7 @@ shared_library("sample_app") {
deps = [ deps = [
":spinning_cube", ":spinning_cube",
"//gpu/command_buffer/client:gles2_interface",
"//mojo/public/cpp/application:standalone", "//mojo/public/cpp/application:standalone",
"//mojo/public/cpp/bindings", "//mojo/public/cpp/bindings",
"//mojo/public/cpp/utility", "//mojo/public/cpp/utility",
......
...@@ -23,6 +23,7 @@ component("gles2") { ...@@ -23,6 +23,7 @@ component("gles2") {
"//gpu/command_buffer/client", "//gpu/command_buffer/client",
"//gpu/command_buffer/common", "//gpu/command_buffer/common",
"//gpu/command_buffer/client:gles2_implementation", "//gpu/command_buffer/client:gles2_implementation",
"//gpu/command_buffer/client:gles2_interface",
"//mojo/services/gles2:bindings", "//mojo/services/gles2:bindings",
"//mojo/services/gles2:interfaces", "//mojo/services/gles2:interfaces",
"//mojo/environment:chromium", "//mojo/environment:chromium",
......
...@@ -253,6 +253,7 @@ executable("bench") { ...@@ -253,6 +253,7 @@ executable("bench") {
"//base", "//base",
"//base:i18n", "//base:i18n",
"//cc", "//cc",
"//gpu/command_buffer/client:gles2_interface",
"//skia", "//skia",
"//third_party/icu", "//third_party/icu",
"//ui/base", "//ui/base",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment