summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslan <slan@chromium.org>2015-11-13 09:46:49 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-13 17:47:41 +0000
commit93f59d1d9032abbd9791652f4dcbbdff98ac60e3 (patch)
tree531e57b2cdf7bbc558e13b658ad72a0c5df125e5
parentecdc43285aed600c3b48ea91d0ff45931d28d62e (diff)
downloadchromium_src-93f59d1d9032abbd9791652f4dcbbdff98ac60e3.zip
chromium_src-93f59d1d9032abbd9791652f4dcbbdff98ac60e3.tar.gz
chromium_src-93f59d1d9032abbd9791652f4dcbbdff98ac60e3.tar.bz2
[Chromecast] Audio-only builds should not enable "cast" ozone platform.
Currently this is being configured in infrastructure. Remove the complexity of setting up an audio build by setting the "headless" platform to default for "disable_display" builds. BUG= Review URL: https://codereview.chromium.org/1442643005 Cr-Commit-Position: refs/heads/master@{#359578}
-rw-r--r--build/config/chromecast_build.gni6
-rw-r--r--chromecast/chromecast.gni5
-rw-r--r--ui/ozone/ozone.gni23
3 files changed, 22 insertions, 12 deletions
diff --git a/build/config/chromecast_build.gni b/build/config/chromecast_build.gni
index 3fac609..b3d1bc2 100644
--- a/build/config/chromecast_build.gni
+++ b/build/config/chromecast_build.gni
@@ -8,8 +8,14 @@ declare_args() {
# Set this true for a Chromecast build. Chromecast builds are supported on
# Linux and Android.
is_chromecast = false
+
+ # Set this true for an audio-only Chromecast build.
+ disable_display = false
}
# Assert that Chromecast is being built for a supported platform.
assert(is_linux || is_android || !is_chromecast,
"Chromecast builds are not supported on $target_os")
+
+# Assert that disable_display is not true on a non-Chromecast build.
+assert(!disable_display || is_chromecast)
diff --git a/chromecast/chromecast.gni b/chromecast/chromecast.gni
index 2edb069..fa36ec9 100644
--- a/chromecast/chromecast.gni
+++ b/chromecast/chromecast.gni
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/chromecast_build.gni")
+
# This args block should contain arguments used within the //chromecast
# directory. Arguments which are used in other Chrome components should
# be instead declared in //build/config/chromecast_build.gni.
@@ -15,7 +17,4 @@ declare_args() {
# Use Playready CDMs.
use_playready = false
-
- # Set this true to perform an audio-only build.
- disable_display = false
}
diff --git a/ui/ozone/ozone.gni b/ui/ozone/ozone.gni
index 15e909d..a1fe2f8 100644
--- a/ui/ozone/ozone.gni
+++ b/ui/ozone/ozone.gni
@@ -30,16 +30,21 @@ declare_args() {
if (ozone_auto_platforms) {
if (is_chromecast) {
- # The default platform used at runtime is "cast".
- ozone_platform = "cast"
- ozone_platform_cast = true
ozone_platform_headless = true
-
- # For desktop Chromecast builds, override the default "cast" platform with
- # --ozone_platform=egltest
- if (target_os == "linux" && target_cpu != "arm") {
- ozone_platform_egltest = true
- ozone_platform_ozonex = true
+ if (disable_display) {
+ # Audio-only builds should use the "headless" platform by default.
+ ozone_platform = "headless"
+ } else {
+ # Builds with video should default to the "cast" platform.
+ ozone_platform_cast = true
+ ozone_platform = "cast"
+
+ # For desktop Chromecast builds, override the default "cast" platform with
+ # --ozone_platform=egltest
+ if (target_os == "linux" && target_cpu != "arm") {
+ ozone_platform_egltest = true
+ ozone_platform_ozonex = true
+ }
}
} else {
# Use headless as the default platform.