summaryrefslogtreecommitdiffstats
path: root/gpu
diff options
context:
space:
mode:
authorbrettw <brettw@chromium.org>2016-03-17 20:22:46 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-18 03:24:04 +0000
commit09039c14ad6710587d13e64e3ddf8cad1d292347 (patch)
treef6d918fbc2fb89d1746908f005ada58f1fda7587 /gpu
parentff43dcf4c622fb46b062abca1024a89fb01b54c7 (diff)
downloadchromium_src-09039c14ad6710587d13e64e3ddf8cad1d292347.zip
chromium_src-09039c14ad6710587d13e64e3ddf8cad1d292347.tar.gz
chromium_src-09039c14ad6710587d13e64e3ddf8cad1d292347.tar.bz2
Enable GN check for gpu and rlz
Rlz already passed on Windows. GPU had a bunch of errors which are fixed here by adding the necessary dependencies and in a few cases removing unnecessary headers. gpu_memory_buffer_manager.h included stuff from ui/gfx but adding a dependency on //ui/gfx pulls Skia into the NaCl IRT (and mesa into Android) and everything goes badly. The GPU memory buffer stuff turns out to be separable from gfx so I created a new target for this. The same is true for ui/gfx/native_widget_types.h (this is just some enums in a .h file) so I made a separate target for this as well. In support of the Skia-in-NaCl problem, I added an assert_no_deps annotation on the NaCl IRT so people will get an error if they accidentally add this Skia dependency (this has come up before, it's easy to add a //ui/gfx dependency in the wrong place). It also fixes the Skia build in NaCl by updating the condition for extra warning to match build config. Without this update, the assert_no_deps won't be reached before an error running the skia build file, which won't make any sense in the context of addnig a random dependency. Minor cleanup of the use_libpci conditionals that was exposed by this (the define that controlled the header didn't exactly match the corresponding dependencies). CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel TBR=jschuh (gpu/ipc build changes) Review URL: https://codereview.chromium.org/1800343002 Cr-Commit-Position: refs/heads/master@{#381881}
Diffstat (limited to 'gpu')
-rw-r--r--gpu/command_buffer/client/BUILD.gn11
-rw-r--r--gpu/command_buffer/common/gles2_cmd_utils.cc1
-rw-r--r--gpu/command_buffer/service/BUILD.gn2
-rw-r--r--gpu/config/BUILD.gn4
-rw-r--r--gpu/config/gpu_info_collector_linux.cc2
-rw-r--r--gpu/gles2_conform_support/egl/BUILD.gn2
-rw-r--r--gpu/ipc/common/BUILD.gn21
-rw-r--r--gpu/skia_bindings/BUILD.gn1
8 files changed, 30 insertions, 14 deletions
diff --git a/gpu/command_buffer/client/BUILD.gn b/gpu/command_buffer/client/BUILD.gn
index f114d1f..25b0fca 100644
--- a/gpu/command_buffer/client/BUILD.gn
+++ b/gpu/command_buffer/client/BUILD.gn
@@ -59,7 +59,11 @@ source_set("client_sources") {
all_dependent_configs = [ "//third_party/khronos:khronos_headers" ]
deps = [
+ "//base",
"//gpu/command_buffer/common:common_sources",
+ "//gpu/command_buffer/common:gles2_utils",
+ "//ui/gfx:memory_buffer",
+ "//ui/gfx/geometry",
]
}
@@ -79,6 +83,8 @@ source_set("gles2_cmd_helper_sources") {
deps = [
":client_sources",
+ "//base",
+ "//gpu/command_buffer/common:common_sources",
]
}
@@ -145,6 +151,8 @@ component("gles2_implementation") {
":gles2_cmd_helper",
":gles2_interface",
"//base",
+ "//gpu/command_buffer/client",
+ "//gpu/command_buffer/common",
"//gpu/command_buffer/common:gles2_utils",
"//ui/gfx/geometry",
]
@@ -163,8 +171,11 @@ component("gles2_implementation_no_check") {
]
deps = [
+ ":client",
":gles2_cmd_helper",
+ ":gles2_interface",
"//base",
+ "//gpu/command_buffer/common",
"//gpu/command_buffer/common:gles2_utils",
"//ui/gfx",
"//ui/gfx/geometry",
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.cc b/gpu/command_buffer/common/gles2_cmd_utils.cc
index adf0c2d..cf69310 100644
--- a/gpu/command_buffer/common/gles2_cmd_utils.cc
+++ b/gpu/command_buffer/common/gles2_cmd_utils.cc
@@ -12,7 +12,6 @@
#include <GLES3/gl3.h>
#include "base/numerics/safe_math.h"
-#include "gpu/command_buffer/common/gles2_cmd_format.h"
#include "gpu/command_buffer/common/gles2_cmd_utils.h"
namespace gpu {
diff --git a/gpu/command_buffer/service/BUILD.gn b/gpu/command_buffer/service/BUILD.gn
index 7b95924..7ad6816 100644
--- a/gpu/command_buffer/service/BUILD.gn
+++ b/gpu/command_buffer/service/BUILD.gn
@@ -145,6 +145,8 @@ source_set("service_sources") {
"//base",
"//base/third_party/dynamic_annotations",
"//crypto",
+ "//gpu/command_buffer/client:client_sources",
+ "//gpu/command_buffer/common:gles2_utils",
"//gpu/config:config_sources",
"//third_party/angle:commit_id",
"//third_party/angle:translator",
diff --git a/gpu/config/BUILD.gn b/gpu/config/BUILD.gn
index 9517319..3ca9edf 100644
--- a/gpu/config/BUILD.gn
+++ b/gpu/config/BUILD.gn
@@ -7,7 +7,7 @@ import("//build/config/ui.gni")
declare_args() {
# Use the PCI lib to collect GPU information on Linux.
- use_libpci = !is_chromecast
+ use_libpci = is_linux && !is_chromecast && (use_x11 || use_ozone)
}
group("config") {
@@ -95,8 +95,6 @@ source_set("config_sources") {
}
if (use_libpci) {
defines = [ "USE_LIBPCI=1" ]
- }
- if (is_linux && use_libpci && (use_x11 || use_ozone)) {
deps += [ "//build/linux:libpci" ]
}
if (is_linux && use_x11) {
diff --git a/gpu/config/gpu_info_collector_linux.cc b/gpu/config/gpu_info_collector_linux.cc
index e201ce0..7fce931 100644
--- a/gpu/config/gpu_info_collector_linux.cc
+++ b/gpu/config/gpu_info_collector_linux.cc
@@ -27,7 +27,7 @@
#include "ui/gl/gl_switches.h"
#if defined(USE_LIBPCI)
-#include "library_loaders/libpci.h"
+#include "library_loaders/libpci.h" // nogncheck
#endif
namespace gpu {
diff --git a/gpu/gles2_conform_support/egl/BUILD.gn b/gpu/gles2_conform_support/egl/BUILD.gn
index ee06fbf..556f053 100644
--- a/gpu/gles2_conform_support/egl/BUILD.gn
+++ b/gpu/gles2_conform_support/egl/BUILD.gn
@@ -25,6 +25,8 @@ source_set("egl") {
deps = [
"//base",
"//gpu",
+ "//gpu:command_buffer_gles2",
+ "//gpu/command_buffer/client:gles2_c_lib_nocheck",
"//gpu/command_buffer/client:gles2_implementation_no_check",
"//gpu/command_buffer/service",
"//ui/base",
diff --git a/gpu/ipc/common/BUILD.gn b/gpu/ipc/common/BUILD.gn
index 67c4d8b..a110524 100644
--- a/gpu/ipc/common/BUILD.gn
+++ b/gpu/ipc/common/BUILD.gn
@@ -25,15 +25,6 @@ source_set("ipc_common_sources") {
"memory_stats.h",
]
- if (is_android) {
- sources += [
- "android/surface_texture_manager.cc",
- "android/surface_texture_manager.h",
- "android/surface_texture_peer.cc",
- "android/surface_texture_peer.h",
- ]
- }
-
configs += [
"//gpu:gpu_implementation",
"//third_party/khronos:khronos_headers",
@@ -43,5 +34,17 @@ source_set("ipc_common_sources") {
"//base",
"//gpu/command_buffer/common:common_sources",
"//ipc",
+ "//ui/gfx:native_widget_types",
]
+
+ if (is_android) {
+ sources += [
+ "android/surface_texture_manager.cc",
+ "android/surface_texture_manager.h",
+ "android/surface_texture_peer.cc",
+ "android/surface_texture_peer.h",
+ ]
+
+ deps += [ "//ui/gl" ]
+ }
}
diff --git a/gpu/skia_bindings/BUILD.gn b/gpu/skia_bindings/BUILD.gn
index 2bd2a44..5bd9ba2 100644
--- a/gpu/skia_bindings/BUILD.gn
+++ b/gpu/skia_bindings/BUILD.gn
@@ -8,6 +8,7 @@ source_set("skia_bindings") {
"gl_bindings_skia_cmd_buffer.h",
]
deps = [
+ "//base",
"//gpu/command_buffer/client:gles2_c_lib",
"//skia",
]