Commit cc45a53c authored by Maksim Sisov's avatar Maksim Sisov Committed by Commit Bot

Reland "Reland "Reland "X11 and Ozone: enable use_x11 and use_ozone"""

This is a reland of 8ce938a2

Fixes vulkan tests on Linux FYI SkiaRenderer Vulkan
and angle tests on Linux Ozone FYI bot.

Original change's description:
> Reland "Reland "X11 and Ozone: enable use_x11 and use_ozone""
>
> This is a reland of 75363679
>
> Original change's description:
> > Reland "X11 and Ozone: enable use_x11 and use_ozone"
> >
> > This is a reland of f985905e.
> >
> > This change broke our headless build:
> > ERROR at //ui/events/platform/x11/BUILD.gn:51:5: Assertion failed.
> >     assert(ozone_platform_x11)
> >     ^-----
> > See //components/viz/demo/BUILD.gn:73:7: which caused the file to be included.
> >       "//ui/events/platform/x11",.
> >
> > Fix:
> > Don't include x11 build for headless case.
> >
> > Original change's description:
> > > X11 and Ozone: enable use_x11 and use_ozone
> > >
> > > This is the final change that enables use_x11
> > > and use_ozone for Linux builds and (as it was
> > > before) excludes X11 for chromeos, chromecast,
> > > lacros.
> > >
> > > in order to run ozone/X11/wayland, one must pass
> > > —enable-features=UseOzonePlatform
> > > —ozone-platform=x11 or wayland. otherwise,
> > > non-ozone/X11 is used.
> > >
> > > it’s also possible to completely disable X11
> > > so that clients, who need that kind of build can
> > > continue to have that.
> > >
> > > Bug: 1085700
> > > Change-Id: I171bcb53c406555a1d4bec3e88d76dc676310d48
> > > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2315869
> > > Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
> > > Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
> > > Reviewed-by: Scott Violet <sky@chromium.org>
> > > Commit-Queue: Maksim Sisov (GMT+3) <msisov@igalia.com>
> > > Cr-Commit-Position: refs/heads/master@{#801523}
> >
> > Bug: 1085700
> > Change-Id: I8bf0abead6c94c95ddc58443de7cf2268c977cf1
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2376806
> > Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
> > Commit-Queue: Maksim Sisov (GMT+3) <msisov@igalia.com>
> > Cr-Commit-Position: refs/heads/master@{#801692}
>
> Bug: 1085700
> Change-Id: Ia5ed2af9376354d3378d8edd98a7a1446f13c88b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2379190
> Commit-Queue: Maksim Sisov (GMT+3) <msisov@igalia.com>
> Reviewed-by: Robert Kroeger <rjkroege@chromium.org>
> Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#802773}

Bug: 1085700
Change-Id: I26fb00938adc6a9e49576257ca316f23830e9cf1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2382834
Commit-Queue: Maksim Sisov (GMT+3) <msisov@igalia.com>
Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#803448}
parent f1593cf3
...@@ -45,3 +45,6 @@ v8_enable_lazy_source_positions = false ...@@ -45,3 +45,6 @@ v8_enable_lazy_source_positions = false
use_glib = false use_glib = false
use_gtk = false use_gtk = false
use_pangocairo = false use_pangocairo = false
# TODO(1096425): Remove this once use_x11 goes away.
use_x11 = false
...@@ -22,8 +22,15 @@ import("//build/config/chromeos/ui_mode.gni") ...@@ -22,8 +22,15 @@ import("//build/config/chromeos/ui_mode.gni")
declare_args() { declare_args() {
# Indicates if Ozone is enabled. Ozone is a low-level library layer for Linux # Indicates if Ozone is enabled. Ozone is a low-level library layer for Linux
# that does not require X11. Enabling this feature disables use of x11. # that does not require X11.
use_ozone = is_chromeos || (is_chromecast && !is_android) || is_fuchsia use_ozone =
is_chromeos || (is_chromecast && !is_android) || is_fuchsia || is_linux
# Indicates if the UI toolkit depends on X11.
# Enabled by default. Can be disabled if Ozone only build is required and
# vice-versa.
use_x11 =
is_linux && !is_chromecast && !is_chromeos && !chromeos_is_browser_only
# Indicates if Aura is enabled. Aura is a low-level windowing library, sort # Indicates if Aura is enabled. Aura is a low-level windowing library, sort
# of a replacement for GDI or GTK. # of a replacement for GDI or GTK.
...@@ -38,13 +45,6 @@ declare_args() { ...@@ -38,13 +45,6 @@ declare_args() {
use_glib = is_desktop_linux && !is_chromecast use_glib = is_desktop_linux && !is_chromecast
} }
# Additional dependent variables -----------------------------------------------
#
# These variables depend on other variables and can't be set externally.
# Indicates if the UI toolkit depends on X11.
use_x11 = is_linux && !use_ozone
# Make sure glib is not used if building for ChromeOS/Chromecast # Make sure glib is not used if building for ChromeOS/Chromecast
assert(!use_glib || (is_linux && !is_chromeos && !is_chromecast)) assert(!use_glib || (is_linux && !is_chromeos && !is_chromecast))
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "ui/events/platform/platform_event_source.h" #include "ui/events/platform/platform_event_source.h"
#if defined(USE_OZONE) #if defined(USE_OZONE)
#include "ui/base/ui_base_features.h"
#include "ui/ozone/public/ozone_platform.h" #include "ui/ozone/public/ozone_platform.h"
#endif #endif
...@@ -30,13 +31,15 @@ class VulkanTestSuite : public base::TestSuite { ...@@ -30,13 +31,15 @@ class VulkanTestSuite : public base::TestSuite {
#if defined(USE_OZONE) #if defined(USE_OZONE)
// Make Ozone run in single-process mode. // Make Ozone run in single-process mode.
ui::OzonePlatform::InitParams params; if (features::IsUsingOzonePlatform()) {
params.single_process = true; ui::OzonePlatform::InitParams params;
params.single_process = true;
// This initialization must be done after TaskEnvironment has
// initialized the UI thread. // This initialization must be done after TaskEnvironment has
ui::OzonePlatform::InitializeForUI(params); // initialized the UI thread.
ui::OzonePlatform::InitializeForGPU(params); ui::OzonePlatform::InitializeForUI(params);
ui::OzonePlatform::InitializeForGPU(params);
}
#endif #endif
} }
......
...@@ -1374,7 +1374,7 @@ ...@@ -1374,7 +1374,7 @@
], ],
'angle_ozone_linux_system_gbm_libdrm_release_trybot': [ 'angle_ozone_linux_system_gbm_libdrm_release_trybot': [
'angle_tests', 'ozone_linux', 'system_gbm_libdrm', 'release_trybot', 'angle_tests', 'ozone_linux', 'ozone_linux_non_x11', 'system_gbm_libdrm', 'release_trybot',
], ],
'asan_clang_shared_v8_heap_minimal_symbols_release_tot': [ 'asan_clang_shared_v8_heap_minimal_symbols_release_tot': [
...@@ -2896,6 +2896,14 @@ ...@@ -2896,6 +2896,14 @@
'gn_args': 'use_ozone=true ozone_platform="headless" use_bundled_weston=true', 'gn_args': 'use_ozone=true ozone_platform="headless" use_bundled_weston=true',
}, },
# TODO(anglebug.com/4977): Make angle understand what platform it should
# use. Otherwise, the use_x11 && use_ozone config breaks Linux Ozone FYI (Intel) bot
# that exercises angle + ozone (though, it is ozone/drm in reality. We don't support
# angle on Linux Ozone/X11/Wayland yet).
'ozone_linux_non_x11': {
'gn_args': 'use_x11=false'
},
# Used to pass the list of files to instrument for coverage to the compile # Used to pass the list of files to instrument for coverage to the compile
# wrapper. See: # wrapper. See:
# https://cs.chromium.org/chromium/build/scripts/slave/recipe_modules/code_coverage/api.py # https://cs.chromium.org/chromium/build/scripts/slave/recipe_modules/code_coverage/api.py
......
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