Move ash::switches::kForceSystemCompositorMode to ozone_switches.h
ash::switches::kForceSystemCompositorMode is used to enable system compositor for mostly testing on ozone platform without a real device. So, this CL moves it to ui/ozone/public/ozone_switches.h and renames to ::switches::kEnableRunningAsSystemCompositor for consistency in naming with ::switches::kDisableRunningAsSystemCompositor. This CL is part of the Chrome OS source code directory migration: https://docs.google.com/document/d/1g-98HpzA8XcoGBWUv1gQNr4rbnD5yfvbtYZyPDDbkaE. Change-Id: I273ac3e8ba63a32ed9e306e975c5c673a4ae79b7 Bug: 1164001 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4108574 Reviewed-by: Robert Kroeger <rjkroege@chromium.org> Reviewed-by: Mitsuru Oshima <oshima@chromium.org> Commit-Queue: Yeunjoo Choi <ychoi@igalia.com> Cr-Commit-Position: refs/heads/main@{#1087072}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
eadabfdddf
commit
eff2c8f735
ash
chromeos/ash/components/system
docs/linux
ui
display
ozone
@ -581,9 +581,6 @@ const char kForceShowCursor[] = "force-show-cursor";
|
||||
// being on a non-stable release channel with feedback enabled.
|
||||
const char kForceShowReleaseTrack[] = "force-show-release-track";
|
||||
|
||||
// Force system compositor mode when set.
|
||||
const char kForceSystemCompositorMode[] = "force-system-compositor-mode";
|
||||
|
||||
// If set, tablet-like power button behavior (i.e. tapping the button turns the
|
||||
// screen off) is used even if the device is in laptop mode.
|
||||
const char kForceTabletPowerButton[] = "force-tablet-power-button";
|
||||
|
@ -194,7 +194,6 @@ COMPONENT_EXPORT(ASH_CONSTANTS) extern const char kForceLaunchBrowser[];
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS) extern const char kForceLoginManagerInTests[];
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS) extern const char kForceShowCursor[];
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS) extern const char kForceShowReleaseTrack[];
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS) extern const char kForceSystemCompositorMode[];
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS) extern const char kForceTabletPowerButton[];
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS) extern const char kFormFactor[];
|
||||
COMPONENT_EXPORT(ASH_CONSTANTS) extern const char kFrameThrottleFps[];
|
||||
|
@ -66,6 +66,7 @@
|
||||
#include "ui/gfx/geometry/point.h"
|
||||
#include "ui/gfx/geometry/vector3d_f.h"
|
||||
#include "ui/message_center/message_center.h"
|
||||
#include "ui/ozone/public/ozone_switches.h"
|
||||
#include "ui/views/test/native_widget_factory.h"
|
||||
#include "ui/wm/core/cursor_manager.h"
|
||||
#include "ui/wm/core/window_util.h"
|
||||
@ -1787,7 +1788,7 @@ class TabletModeControllerOnDeviceTest : public TabletModeControllerTest {
|
||||
void SetUp() override {
|
||||
// We need to simulate the real on-device behavior for some tests.
|
||||
base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
||||
switches::kForceSystemCompositorMode);
|
||||
::switches::kEnableRunningAsSystemCompositor);
|
||||
TabletModeControllerTest::SetUp();
|
||||
// PowerManagerClient callback is a posted task.
|
||||
base::RunLoop().RunUntilIdle();
|
||||
|
@ -15,7 +15,7 @@ component("system") {
|
||||
deps = [
|
||||
"//ash/constants",
|
||||
"//base",
|
||||
"//ui/ozone:ozone_base",
|
||||
"//ui/ozone:ozone_switches",
|
||||
]
|
||||
sources = [
|
||||
"devicemode.cc",
|
||||
|
@ -4,7 +4,6 @@
|
||||
|
||||
#include "chromeos/ash/components/system/devicemode.h"
|
||||
|
||||
#include "ash/constants/ash_switches.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/system/sys_info.h"
|
||||
#include "ui/ozone/public/ozone_switches.h"
|
||||
@ -19,7 +18,7 @@ bool IsRunningAsSystemCompositor() {
|
||||
static bool is_running_on_chrome_os = base::SysInfo::IsRunningOnChromeOS();
|
||||
return is_running_on_chrome_os ||
|
||||
base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
ash::switches::kForceSystemCompositorMode);
|
||||
::switches::kEnableRunningAsSystemCompositor);
|
||||
}
|
||||
|
||||
} // namespace chromeos
|
||||
|
@ -88,7 +88,7 @@ $ pactl exit
|
||||
Run chrome: (Set `CHROMIUM_SRC` to the directory containing your Chrome checkout.)
|
||||
|
||||
```
|
||||
$ sudo chvt 8; EGL_PLATFORM=surfaceless $CHROMIUM_SRC/out/Nouveau/chrome --ozone-platform=drm --force-system-compositor-mode --login-profile=user --user-data-dir=$HOME/.config/google-chrome-gbm --use-gl=egl --enable-wayland-server --login-manager --ash-constrain-pointer-to-root --default-tile-width=512 --default-tile-height=512 --system-developer-mode --crosh-command=/bin/bash
|
||||
$ sudo chvt 8; EGL_PLATFORM=surfaceless $CHROMIUM_SRC/out/Nouveau/chrome --ozone-platform=drm --enable-running-as-system-compositor --login-profile=user --user-data-dir=$HOME/.config/google-chrome-gbm --use-gl=egl --enable-wayland-server --login-manager --ash-constrain-pointer-to-root --default-tile-width=512 --default-tile-height=512 --system-developer-mode --crosh-command=/bin/bash
|
||||
```
|
||||
|
||||
Login to Chrome settings should synchronize.
|
||||
|
@ -278,8 +278,8 @@ test("display_unittests") {
|
||||
]
|
||||
deps += [
|
||||
":display_manager_test_api",
|
||||
"//ash/constants",
|
||||
"//ui/display/manager",
|
||||
"//ui/ozone:ozone_switches",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
include_rules = [
|
||||
"+ash/constants",
|
||||
"+chromeos",
|
||||
"+third_party/skia",
|
||||
"+ui/base",
|
||||
"+ui/events/devices",
|
||||
"+ui/events/platform_event.h",
|
||||
"+ui/ozone/public/ozone_switches.h",
|
||||
"+ui/strings",
|
||||
]
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "ash/constants/ash_switches.h"
|
||||
#include "base/bind.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/run_loop.h"
|
||||
@ -20,6 +19,7 @@
|
||||
#include "ui/display/manager/test/test_native_display_delegate.h"
|
||||
#include "ui/display/types/display_constants.h"
|
||||
#include "ui/display/util/display_util.h"
|
||||
#include "ui/ozone/public/ozone_switches.h"
|
||||
|
||||
namespace display {
|
||||
namespace test {
|
||||
@ -244,7 +244,7 @@ class DisplayConfiguratorTest : public testing::Test {
|
||||
|
||||
// Force system compositor mode to simulate on-device configurator behavior.
|
||||
base::CommandLine::ForCurrentProcess()->AppendSwitch(
|
||||
ash::switches::kForceSystemCompositorMode);
|
||||
::switches::kEnableRunningAsSystemCompositor);
|
||||
|
||||
native_display_delegate_ = new TestNativeDisplayDelegate(log_.get());
|
||||
configurator_.SetDelegateForTesting(
|
||||
|
@ -161,7 +161,6 @@ component("ozone_base") {
|
||||
visibility += [
|
||||
# Everyone should depend on //ui/ozone instead except a handful of
|
||||
# things that would otherwise create a cycle.
|
||||
"//chromeos/ash/components/system",
|
||||
"//ui/base/ime/ash/*",
|
||||
"//ui/events/ozone/*",
|
||||
"//ui/ozone/common/*",
|
||||
@ -243,7 +242,9 @@ source_set("ozone_switches") {
|
||||
|
||||
visibility += [
|
||||
"//chrome/test:browser_tests_runner",
|
||||
"//chromeos/ash/components/system",
|
||||
"//media/mojo/services",
|
||||
"//ui/display:display_unittests",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,11 @@ const char kDisableExplicitDmaFences[] = "disable-explicit-dma-fences";
|
||||
const char kDisableRunningAsSystemCompositor[] =
|
||||
"disable-running-as-system-compositor";
|
||||
|
||||
// Enable running as system compositor when set.
|
||||
// TODO(https://crbug.com/1403348): Consider removing the flag.
|
||||
const char kEnableRunningAsSystemCompositor[] =
|
||||
"enable-running-as-system-compositor";
|
||||
|
||||
// Disable buffer bandwidth compression
|
||||
const char kDisableBufferBWCompression[] = "disable-buffer-bw-compression";
|
||||
|
||||
|
@ -28,6 +28,9 @@ COMPONENT_EXPORT(OZONE_SWITCHES) extern const char kDisableExplicitDmaFences[];
|
||||
COMPONENT_EXPORT(OZONE_SWITCHES)
|
||||
extern const char kDisableRunningAsSystemCompositor[];
|
||||
|
||||
COMPONENT_EXPORT(OZONE_SWITCHES)
|
||||
extern const char kEnableRunningAsSystemCompositor[];
|
||||
|
||||
COMPONENT_EXPORT(OZONE_SWITCHES)
|
||||
extern const char kDisableBufferBWCompression[];
|
||||
|
||||
|
Reference in New Issue
Block a user