Commit b3c7880d authored by brettw's avatar brettw Committed by Commit bot

Work on Windows GN component build.

This makes ppapi_shared link. This required many changes to gpu to match the structure of GYP in both component and non-component modes.

BUG=470212
CQ_EXTRA_TRYBOTS=tryserver.chromium.linux:android_chromium_gn_compile_dbg,android_chromium_gn_compile_rel;tryserver.chromium.win:win8_chromium_gn_rel,win8_chromium_gn_dbg;tryserver.chromium.mac:mac_chromium_gn_rel,mac_chromium_gn_dbg

Review URL: https://codereview.chromium.org/1053203003

Cr-Commit-Position: refs/heads/master@{#323937}
parent 318e9c81
...@@ -146,7 +146,6 @@ if (enable_nacl) { ...@@ -146,7 +146,6 @@ if (enable_nacl) {
"//ppapi/c", "//ppapi/c",
"//ppapi/proxy:ipc", "//ppapi/proxy:ipc",
"//ppapi/shared_impl", "//ppapi/shared_impl",
"//ppapi/thunk",
"//third_party/WebKit/public:blink", "//third_party/WebKit/public:blink",
"//third_party/jsoncpp", "//third_party/jsoncpp",
] ]
......
...@@ -144,6 +144,7 @@ source_set("common") { ...@@ -144,6 +144,7 @@ source_set("common") {
"//build/util:webkit_version", "//build/util:webkit_version",
"//components/tracing", "//components/tracing",
"//gpu/command_buffer/client:gles2_interface", "//gpu/command_buffer/client:gles2_interface",
"//gpu/command_buffer/common:gles2_utils",
"//net", "//net",
"//skia", "//skia",
"//third_party/icu", "//third_party/icu",
...@@ -279,8 +280,10 @@ source_set("common") { ...@@ -279,8 +280,10 @@ source_set("common") {
} }
if (use_x11) { if (use_x11) {
include_dirs += [ "//third_party/khronos" ] configs += [
configs += [ "//build/config/linux:xcomposite" ] "//build/config/linux:xcomposite",
"//third_party/khronos:khronos_headers",
]
if (current_cpu != "arm" || !is_chromeos) { if (current_cpu != "arm" || !is_chromeos) {
sources += [ "gpu/x_util.h" ] sources += [ "gpu/x_util.h" ]
...@@ -403,7 +406,7 @@ source_set("common") { ...@@ -403,7 +406,7 @@ source_set("common") {
"gpu/media/dxva_video_decode_accelerator.cc", "gpu/media/dxva_video_decode_accelerator.cc",
"gpu/media/dxva_video_decode_accelerator.h", "gpu/media/dxva_video_decode_accelerator.h",
] ]
include_dirs += [ "//third_party/khronos" ] configs += [ "//third_party/khronos:khronos_headers" ]
deps += [ "//ui/gl" ] deps += [ "//ui/gl" ]
libs += [ libs += [
"d3d9.lib", "d3d9.lib",
......
...@@ -40,12 +40,12 @@ config("gpu_implementation") { ...@@ -40,12 +40,12 @@ config("gpu_implementation") {
component("gpu") { component("gpu") {
public_deps = [ public_deps = [
"//gpu/command_buffer/client", "//gpu/command_buffer/client:client_sources",
"//gpu/command_buffer/client:gles2_cmd_helper_sources", "//gpu/command_buffer/client:gles2_cmd_helper_sources",
"//gpu/command_buffer/common", "//gpu/command_buffer/common:common_sources",
"//gpu/command_buffer/service", "//gpu/command_buffer/service:service_sources",
"//gpu/config", "//gpu/config:config_sources",
"//gpu/ipc", "//gpu/ipc:ipc_sources",
] ]
} }
......
...@@ -24,6 +24,7 @@ component("blink") { ...@@ -24,6 +24,7 @@ component("blink") {
"//base/third_party/dynamic_annotations", "//base/third_party/dynamic_annotations",
"//cc", "//cc",
"//gpu/command_buffer/common", "//gpu/command_buffer/common",
"//gpu/command_buffer/common:gles2_utils",
"//gpu/command_buffer/service", "//gpu/command_buffer/service",
"//gpu/command_buffer/client:gles2_c_lib", "//gpu/command_buffer/client:gles2_c_lib",
"//gpu/command_buffer/client:gles2_implementation", "//gpu/command_buffer/client:gles2_implementation",
......
...@@ -2,7 +2,38 @@ ...@@ -2,7 +2,38 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
source_set("client") { # The files here go into the "gpu" component in a component build (with
# "command_buffer_client" and "gles2_cmd_helper" just forwarding) and goes into
# separate static libraries in non-component build. This needs to match the
# GYP build which was likely an attempt to make larger components to help with
# loading.
group("client") {
if (is_component_build) {
public_deps = [
"//gpu",
]
} else {
public_deps = [
":client_sources",
]
}
}
group("gles2_cmd_helper") {
if (is_component_build) {
public_deps = [
"//gpu",
]
} else {
public_deps = [
":gles2_cmd_helper_sources",
]
}
}
source_set("client_sources") {
visibility = [ "//gpu/*" ]
sources = [ sources = [
"cmd_buffer_helper.cc", "cmd_buffer_helper.cc",
"cmd_buffer_helper.h", "cmd_buffer_helper.h",
...@@ -28,27 +59,12 @@ source_set("client") { ...@@ -28,27 +59,12 @@ source_set("client") {
all_dependent_configs = [ "//third_party/khronos:khronos_headers" ] all_dependent_configs = [ "//third_party/khronos:khronos_headers" ]
deps = [ deps = [
"//gpu/command_buffer/common", "//gpu/command_buffer/common:common_sources",
] ]
} }
group("gles2_cmd_helper") {
if (is_component_build) {
deps = [
"//gpu",
]
} else {
deps = [
":gles2_cmd_helper_sources",
]
}
}
source_set("gles2_cmd_helper_sources") { source_set("gles2_cmd_helper_sources") {
visibility = [ visibility = [ "//gpu/*" ]
":gles2_cmd_helper",
"//gpu",
]
sources = [ sources = [
"gles2_cmd_helper.cc", "gles2_cmd_helper.cc",
"gles2_cmd_helper.h", "gles2_cmd_helper.h",
...@@ -62,7 +78,7 @@ source_set("gles2_cmd_helper_sources") { ...@@ -62,7 +78,7 @@ source_set("gles2_cmd_helper_sources") {
] ]
deps = [ deps = [
":client", ":client_sources",
] ]
} }
......
...@@ -2,7 +2,25 @@ ...@@ -2,7 +2,25 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
source_set("common") { # The files here go into the "gpu" component in a component build (with
# "command_buffer_common" just forwarding) and goes into a static library in
# non-component build. This needs to match the GYP build which was likely an
# attempt to make larger components to help with loading.
group("common") {
if (is_component_build) {
public_deps = [
"//gpu",
]
} else {
public_deps = [
":common_sources",
]
}
}
source_set("common_sources") {
visibility = [ "//gpu/*" ]
sources = [ sources = [
"bitfield_helpers.h", "bitfield_helpers.h",
"buffer.cc", "buffer.cc",
......
...@@ -5,7 +5,21 @@ ...@@ -5,7 +5,21 @@
import("//build/config/ui.gni") import("//build/config/ui.gni")
import("//third_party/protobuf/proto_library.gni") import("//third_party/protobuf/proto_library.gni")
source_set("service") { group("service") {
if (is_component_build) {
public_deps = [
"//gpu",
]
} else {
public_deps = [
":service_sources",
]
}
}
source_set("service_sources") {
visibility = [ "//gpu/*" ]
sources = [ sources = [
"async_pixel_transfer_delegate.cc", "async_pixel_transfer_delegate.cc",
"async_pixel_transfer_delegate.h", "async_pixel_transfer_delegate.h",
...@@ -128,7 +142,7 @@ source_set("service") { ...@@ -128,7 +142,7 @@ source_set("service") {
include_dirs = [ "//third_party/mesa/src/include" ] include_dirs = [ "//third_party/mesa/src/include" ]
public_deps = [ public_deps = [
"//gpu/command_buffer/common", "//gpu/command_buffer/common:common_sources",
] ]
deps = [ deps = [
":disk_cache_proto", ":disk_cache_proto",
...@@ -144,10 +158,6 @@ source_set("service") { ...@@ -144,10 +158,6 @@ source_set("service") {
"//ui/gl", "//ui/gl",
] ]
if (ui_compositor_image_transport) {
include_dirs += [ "//third_party/khronos" ]
}
if (is_win || is_android || (is_linux && use_x11)) { if (is_win || is_android || (is_linux && use_x11)) {
sources += [ sources += [
"async_pixel_transfer_manager_egl.cc", "async_pixel_transfer_manager_egl.cc",
......
...@@ -9,7 +9,21 @@ declare_args() { ...@@ -9,7 +9,21 @@ declare_args() {
use_libpci = true use_libpci = true
} }
source_set("config") { group("config") {
if (is_component_build) {
public_deps = [
"//gpu",
]
} else {
public_deps = [
":config_sources",
]
}
}
source_set("config_sources") {
visibility = [ "//gpu/*" ]
sources = [ sources = [
"dx_diag_node.cc", "dx_diag_node.cc",
"dx_diag_node.h", "dx_diag_node.h",
...@@ -52,7 +66,7 @@ source_set("config") { ...@@ -52,7 +66,7 @@ source_set("config") {
deps = [ deps = [
"//base", "//base",
"//gpu/command_buffer/service", "//gpu/command_buffer/service:service_sources",
"//third_party/re2", "//third_party/re2",
"//ui/gl", "//ui/gl",
] ]
......
...@@ -2,7 +2,21 @@ ...@@ -2,7 +2,21 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
source_set("ipc") { group("ipc") {
if (is_component_build) {
public_deps = [
"//gpu",
]
} else {
public_deps = [
":ipc_sources",
]
}
}
source_set("ipc_sources") {
visibility = [ "//gpu/*" ]
sources = [ sources = [
"gpu_command_buffer_traits.cc", "gpu_command_buffer_traits.cc",
"gpu_command_buffer_traits.h", "gpu_command_buffer_traits.h",
...@@ -14,7 +28,7 @@ source_set("ipc") { ...@@ -14,7 +28,7 @@ source_set("ipc") {
] ]
deps = [ deps = [
"//gpu/command_buffer/common", "//gpu/command_buffer/common:common_sources",
"//ipc", "//ipc",
] ]
} }
...@@ -378,6 +378,7 @@ source_set("unittests") { ...@@ -378,6 +378,7 @@ source_set("unittests") {
deps = [ deps = [
":base", ":base",
":test_support", ":test_support",
"//gpu/command_buffer/common",
"//skia", "//skia",
"//testing/gmock", "//testing/gmock",
"//testing/gtest", "//testing/gtest",
......
...@@ -272,7 +272,7 @@ component("proxy") { ...@@ -272,7 +272,7 @@ component("proxy") {
"//ipc", "//ipc",
"//media:shared_memory_support", "//media:shared_memory_support",
"//ppapi/c", "//ppapi/c",
"//ppapi/proxy:ipc", "//ppapi/proxy:ipc_sources",
"//ppapi/shared_impl", "//ppapi/shared_impl",
"//third_party/icu", "//third_party/icu",
] ]
...@@ -293,7 +293,19 @@ component("proxy") { ...@@ -293,7 +293,19 @@ component("proxy") {
} }
} }
source_set("ipc") { group("ipc") {
if (is_component_build) {
public_deps = [
"//ppapi/proxy",
]
} else {
public_deps = [
":ipc_sources",
]
}
}
source_set("ipc_sources") {
sources = [ sources = [
"nacl_message_scanner.cc", "nacl_message_scanner.cc",
"nacl_message_scanner.h", "nacl_message_scanner.h",
......
...@@ -156,7 +156,7 @@ component("shared_impl") { ...@@ -156,7 +156,7 @@ component("shared_impl") {
defines = [ defines = [
"PPAPI_SHARED_IMPLEMENTATION", "PPAPI_SHARED_IMPLEMENTATION",
# This target also implements some thunk functions. # This target goes in the same library as thunk (in GYP they are the same).
"PPAPI_THUNK_IMPLEMENTATION", "PPAPI_THUNK_IMPLEMENTATION",
] ]
......
...@@ -3,6 +3,12 @@ ...@@ -3,6 +3,12 @@
# found in the LICENSE file. # found in the LICENSE file.
source_set("thunk") { source_set("thunk") {
# In GYP this is the same target as shared_impl. In GN these are split apart
# for clarity but to get component builds correct, targets must only depend
# on these via the shared_impl component.
# TODO(brettw) separate these when GYP compat is no longer required.
visibility = [ "//ppapi/shared_impl" ]
sources = [ sources = [
"enter.cc", "enter.cc",
"enter.h", "enter.h",
...@@ -189,5 +195,11 @@ source_set("thunk") { ...@@ -189,5 +195,11 @@ source_set("thunk") {
] ]
} }
defines = [ "PPAPI_THUNK_IMPLEMENTATION" ] defines = [
# This target goes in the same library as shared_impl (in GYP they are the
# same).
"PPAPI_SHARED_IMPLEMENTATION",
"PPAPI_THUNK_IMPLEMENTATION",
]
} }
...@@ -106,15 +106,15 @@ component("gl") { ...@@ -106,15 +106,15 @@ component("gl") {
include_dirs = [ include_dirs = [
"//third_party/switfshader/include", "//third_party/switfshader/include",
"//third_party/khronos",
"//third_party/mesa/src/include", "//third_party/mesa/src/include",
] ]
all_dependent_configs = [ ":gl_config" ] all_dependent_configs = [ ":gl_config" ]
configs += [ "//third_party/khronos:khronos_headers" ]
deps = [ deps = [
"//base/third_party/dynamic_annotations", "//base/third_party/dynamic_annotations",
"//gpu/command_buffer/common",
"//skia", "//skia",
] ]
public_deps = [ public_deps = [
......
...@@ -15,6 +15,8 @@ component("surface") { ...@@ -15,6 +15,8 @@ component("surface") {
"transport_dib_win.cc", "transport_dib_win.cc",
] ]
configs += [ "//third_party/khronos:khronos_headers" ]
defines = [ "SURFACE_IMPLEMENTATION" ] defines = [ "SURFACE_IMPLEMENTATION" ]
deps = [ deps = [
...@@ -25,8 +27,4 @@ component("surface") { ...@@ -25,8 +27,4 @@ component("surface") {
"//ui/gfx/geometry", "//ui/gfx/geometry",
"//ui/gl", "//ui/gl",
] ]
if (use_x11) {
include_dirs = [ "//third_party/khronos" ]
}
} }
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