Skip to content

Commit

Permalink
gl: Add swiftshader as a data-dep to gl.
Browse files Browse the repository at this point in the history
This allows turning on enable_swiftshader in 'gn args', and building,
for example, mus, and have the swiftshader also built correctly.

BUG=none
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2925333003
Cr-Commit-Position: refs/heads/master@{#478498}
  • Loading branch information
sadrulhc authored and Commit Bot committed Jun 10, 2017
1 parent ecdac5c commit a162217
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 0 additions & 6 deletions content/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -1688,7 +1688,6 @@ source_set("browser") {
deps += [
"//third_party/iaccessible2",
"//third_party/isimpledom",
"//third_party/swiftshader",
]
libs += [
"comctl32.lib",
Expand Down Expand Up @@ -1837,11 +1836,6 @@ source_set("browser") {
deps += [ "//ui/gfx/x" ]
}

if (is_linux && !is_chromeos && use_x11 &&
(target_cpu == "x86" || target_cpu == "x64")) {
deps += [ "//third_party/swiftshader" ]
}

if (use_pango) {
configs += [ "//build/config/linux/pangocairo" ]
}
Expand Down
8 changes: 6 additions & 2 deletions ui/gl/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ component("gl") {
"//ui/gfx/geometry",
]

data_deps = []
if (enable_swiftshader) {
data_deps += [ "//third_party/swiftshader" ]
}
if (use_egl) {
sources += [
"angle_platform_impl.cc",
Expand Down Expand Up @@ -198,7 +202,7 @@ component("gl") {

deps += [ "//ui/base/x" ]

data_deps = [
data_deps += [
"//third_party/angle:libEGL",
"//third_party/angle:libGLESv2",
]
Expand Down Expand Up @@ -250,7 +254,7 @@ component("gl") {
libs = [ "dwmapi.lib" ]
ldflags = [ "/DELAYLOAD:dwmapi.dll" ]

data_deps = [
data_deps += [
"//third_party/angle:libEGL",
"//third_party/angle:libGLESv2",
"//third_party/mesa:osmesa",
Expand Down

0 comments on commit a162217

Please sign in to comment.