fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 1 | # Ozone Overview |
| 2 | |
| 3 | Ozone is a platform abstraction layer beneath the Aura window system that is |
| 4 | used for low level input and graphics. Once complete, the abstraction will |
| 5 | support underlying systems ranging from embedded SoC targets to new |
| 6 | X11-alternative window systems on Linux such as Wayland or Mir to bring up Aura |
| 7 | Chromium by providing an implementation of the platform interface. |
| 8 | |
dljames | a0165504 | 2025-03-24 21:43:29 | [diff] [blame] | 9 | > Note: There are 2 buildflags which target platforms who use OZONE. |
| 10 | > They are slightly different from each other: |
| 11 | > * IS_OZONE: Targets Linux, ChromeOS, and Fuchsia. |
| 12 | > * IS_OZONE_WAYLAND: Targets only Linux systems using the Wayland window |
| 13 | > manager. Does not include ChromeOS or Fuchsia. |
| 14 | |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 15 | ## Guiding Principles |
| 16 | |
| 17 | Our goal is to enable chromium to be used in a wide variety of projects by |
| 18 | making porting to new platforms easy. To support this goal, ozone follows the |
| 19 | following principles: |
| 20 | |
| 21 | 1. **Interfaces, not ifdefs**. Differences between platforms are handled by |
| 22 | calling a platform-supplied object through an interface instead of using |
| 23 | conditional compilation. Platform internals remain encapsulated, and the |
| 24 | public interface acts as a firewall between the platform-neutral upper |
| 25 | layers (aura, blink, content, etc) and the platform-specific lower layers. |
| 26 | The platform layer is relatively centralized to minimize the number of |
| 27 | places ports need to add code. |
| 28 | 2. **Flexible interfaces**. The platform interfaces should encapsulate just what |
| 29 | chrome needs from the platform, with minimal constraints on the platform's |
| 30 | implementation as well as minimal constraints on usage from upper layers. An |
| 31 | overly prescriptive interface is less useful for porting because fewer ports |
| 32 | will be able to use it unmodified. Another way of stating is that the |
| 33 | platform layer should provide mechanism, not policy. |
| 34 | 3. **Runtime binding of platforms**. Avoiding conditional compilation in the |
| 35 | upper layers allows us to build multiple platforms into one binary and bind |
| 36 | them at runtime. We allow this and provide a command-line flag to select a |
| 37 | platform (`--ozone-platform`) if multiple are enabled. Each platform has a |
| 38 | unique build define (e.g. `ozone_platform_foo`) that can be turned on or off |
| 39 | independently. |
| 40 | 4. **Easy out-of-tree platforms**. Most ports begin as forks. Some of them |
| 41 | later merge their code upstream, others will have an extended life out of |
| 42 | tree. This is OK, and we should make this process easy to encourage ports, |
| 43 | and to encourage frequent gardening of chromium changes into the downstream |
| 44 | project. If gardening an out-of-tree port is hard, then those projects will |
| 45 | simply ship outdated and potentially insecure chromium-derived code to users. |
| 46 | One way we support these projects is by providing a way to inject additional |
| 47 | platforms into the build by only patching one `ozone_extra.gni` file. |
| 48 | |
| 49 | ## Ozone Platform Interface |
| 50 | |
| 51 | Ozone moves platform-specific code behind the following interfaces: |
| 52 | |
| 53 | * `PlatformWindow` represents a window in the windowing system underlying |
| 54 | chrome. Interaction with the windowing system (resize, maximize, close, etc) |
| 55 | as well as dispatch of input events happens via this interface. Under aura, a |
| 56 | `PlatformWindow` corresponds to a `WindowTreeHost`. Under mojo, it corresponds |
| 57 | to a `NativeViewport`. On bare hardware, the underlying windowing system is |
| 58 | very simple and a platform window corresponds to a physical display. |
| 59 | * `SurfaceFactoryOzone` is used to create surfaces for the Chrome compositor to |
| 60 | paint on using EGL/GLES2 or Skia. |
| 61 | * `GpuPlatformSupportHost` provides the platform code |
| 62 | access to IPC between the browser & GPU processes. Some platforms need this |
| 63 | to provide additional services in the GPU process such as display |
| 64 | configuration. |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 65 | * `OverlayManagerOzone` is used to manage overlays. |
| 66 | * `InputController` allows to control input devices such as keyboard, mouse or |
| 67 | touchpad. |
| 68 | * `SystemInputInjector` converts input into events and injects them to the |
| 69 | Ozone platform. |
| 70 | * `NativeDisplayDelegate` is used to support display configuration & hotplug. |
Maksim Sisov | 0a0b748 | 2018-10-18 07:59:42 | [diff] [blame] | 71 | * `PlatformScreen` is used to fetch screen configuration. |
| 72 | * `ClipboardDelegate` provides an interface to exchange data with other |
| 73 | applications on the host system using a system clipboard mechanism. |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 74 | |
| 75 | ## Ozone in Chromium |
| 76 | |
| 77 | Our implementation of Ozone required changes concentrated in these areas: |
| 78 | |
| 79 | * Cleaning up extensive assumptions about use of X11 throughout the tree, |
kylechar | cbd1148 | 2023-01-04 19:58:19 | [diff] [blame] | 80 | protecting this code behind the `USE_X11` ifdef, and adding a new `IS_OZONE` |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 81 | path that works in a relatively platform-neutral way by delegating to the |
| 82 | interfaces described above. |
| 83 | * a `WindowTreeHostOzone` to send events into Aura and participate in display |
| 84 | management on the host system, and |
| 85 | * an Ozone-specific flavor of `GLSurfaceEGL` which delegates allocation of |
| 86 | accelerated surfaces and refresh syncing to the provided implementation of |
| 87 | `SurfaceFactoryOzone`. |
| 88 | |
| 89 | ## Porting with Ozone |
| 90 | |
| 91 | Users of the Ozone abstraction need to do the following, at minimum: |
| 92 | |
| 93 | * Write a subclass of `PlatformWindow`. This class (I'll call it |
| 94 | `PlatformWindowImpl`) is responsible for window system integration. It can |
| 95 | use `MessagePumpLibevent` to poll for events from file descriptors and then |
| 96 | invoke `PlatformWindowDelegate::DispatchEvent` to dispatch each event. |
| 97 | * Write a subclass of `SurfaceFactoryOzone` that handles allocating accelerated |
| 98 | surfaces. I'll call this `SurfaceFactoryOzoneImpl`. |
Henrique Ferreiro | aaa2a626 | 2020-05-22 00:36:15 | [diff] [blame] | 99 | * Write a subclass of `CursorFactory` to manage cursors, or use the |
Henrique Ferreiro | c3d6e372 | 2021-11-18 20:54:39 | [diff] [blame] | 100 | `BitmapCursorFactory` implementation if only bitmap cursors need to be supported. |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 101 | * Write a subclass of `OverlayManagerOzone` or just use `StubOverlayManager` if |
| 102 | your platform does not support overlays. |
| 103 | * Write a subclass of `NativeDisplayDelegate` if necessary or just use |
Maksim Sisov | 0a0b748 | 2018-10-18 07:59:42 | [diff] [blame] | 104 | `FakeDisplayDelegate`, and write a subclass of `PlatformScreen`, which is |
| 105 | used by aura::ScreenOzone then. |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 106 | * Write a subclass of `GpuPlatformSupportHost` or just use |
| 107 | `StubGpuPlatformSupportHost`. |
| 108 | * Write a subclass of `InputController` or just use `StubInputController`. |
| 109 | * Write a subclass of `SystemInputInjector` if necessary. |
| 110 | * Write a subclass of `OzonePlatform` that owns instances of |
| 111 | the above subclasses and provide a static constructor function for these |
| 112 | objects. This constructor will be called when |
| 113 | your platform is selected and the returned objects will be used to provide |
| 114 | implementations of all the ozone platform interfaces. |
| 115 | If your platform does not need some of the interfaces then you can just |
| 116 | return a `Stub*` instance or a `nullptr`. |
| 117 | |
| 118 | ## Adding an Ozone Platform to the build (instructions for out-of-tree ports) |
| 119 | |
| 120 | The recommended way to add your platform to the build is as follows. This walks |
| 121 | through creating a new ozone platform called `foo`. |
| 122 | |
| 123 | 1. Fork `chromium/src.git`. |
| 124 | 2. Add your implementation in `ui/ozone/platform/` alongside internal platforms. |
| 125 | 3. Patch `ui/ozone/ozone_extra.gni` to add your `foo` platform. |
| 126 | |
| 127 | ## Building with Ozone |
| 128 | |
derat | 8171050 | 2017-02-22 17:57:55 | [diff] [blame] | 129 | ### Chrome OS - ([waterfall](https://build.chromium.org/p/chromium.chromiumos/waterfall?builder=Linux+ChromiumOS+Ozone+Builder&builder=Linux+ChromiumOS+Ozone+Tests+%281%29&builder=Linux+ChromiumOS+Ozone+Tests+%282%29&reload=none)) |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 130 | |
| 131 | To build `chrome`, do this from the `src` directory: |
| 132 | |
| 133 | ``` shell |
| 134 | gn args out/OzoneChromeOS --args="use_ozone=true target_os=\"chromeos\"" |
| 135 | ninja -C out/OzoneChromeOS chrome |
| 136 | ``` |
| 137 | |
| 138 | Then to run for example the X11 platform: |
| 139 | |
| 140 | ``` shell |
fwang | 399b51c | 2016-11-10 09:48:27 | [diff] [blame] | 141 | ./out/OzoneChromeOS/chrome --ozone-platform=x11 |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 142 | ``` |
| 143 | |
| 144 | ### Embedded |
| 145 | |
fwang | 7af9db6 | 2017-01-09 14:52:22 | [diff] [blame] | 146 | **Warning: Only some targets such as `content_shell` or unit tests are |
| 147 | currently working for embedded builds.** |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 148 | |
| 149 | To build `content_shell`, do this from the `src` directory: |
| 150 | |
| 151 | ``` shell |
| 152 | gn args out/OzoneEmbedded --args="use_ozone=true toolkit_views=false" |
| 153 | ninja -C out/OzoneEmbedded content_shell |
| 154 | ``` |
| 155 | |
| 156 | Then to run for example the headless platform: |
| 157 | |
| 158 | ``` shell |
fwang | 399b51c | 2016-11-10 09:48:27 | [diff] [blame] | 159 | ./out/OzoneEmbedded/content_shell --ozone-platform=headless \ |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 160 | --ozone-dump-file=/tmp/ |
| 161 | ``` |
| 162 | |
Maksim Sisov | fb1ab3d | 2021-11-08 06:34:40 | [diff] [blame] | 163 | ### Linux Desktop - ([X11 waterfall](https://ci.chromium.org/p/chromium/builders/try/linux-rel) && |
| 164 | [Wayland waterfall](https://ci.chromium.org/p/chromium/builders/try/linux-wayland-rel)) |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 165 | |
Maksim Sisov | fb1ab3d | 2021-11-08 06:34:40 | [diff] [blame] | 166 | By default, Linux enables the following Ozone backends - X11, Wayland and Headless. |
fwang | 15744c7 | 2016-11-08 13:58:33 | [diff] [blame] | 167 | |
Maksim Sisov | fb1ab3d | 2021-11-08 06:34:40 | [diff] [blame] | 168 | If you want to disable Ozone/X11 in the build, do this from the `src` directory: |
fwang | 15744c7 | 2016-11-08 13:58:33 | [diff] [blame] | 169 | |
| 170 | ``` shell |
Maksim Sisov | fb1ab3d | 2021-11-08 06:34:40 | [diff] [blame] | 171 | gn args out/OzoneLinuxDesktop --args="ozone_platform_x11=false" |
fwang | 15744c7 | 2016-11-08 13:58:33 | [diff] [blame] | 172 | ninja -C out/OzoneLinuxDesktop chrome |
| 173 | ``` |
Maksim Sisov | 0a0b748 | 2018-10-18 07:59:42 | [diff] [blame] | 174 | |
Maksim Sisov | fb1ab3d | 2021-11-08 06:34:40 | [diff] [blame] | 175 | If you want to disable all, but Wayland Ozone backend, do this from the `src` directory: |
fwang | 15744c7 | 2016-11-08 13:58:33 | [diff] [blame] | 176 | |
| 177 | ``` shell |
Maksim Sisov | fb1ab3d | 2021-11-08 06:34:40 | [diff] [blame] | 178 | gn args out/OzoneLinuxDesktop --args="ozone_auto_platforms=false ozone_platform_wayland=true" |
| 179 | ninja -C out/OzoneLinuxDesktop chrome |
| 180 | ``` |
| 181 | |
| 182 | Chrome/Linux uses X11 Ozone backend by default. Thus, simply start the browser without any parameters: |
| 183 | |
| 184 | ``` shell |
| 185 | ./out/OzoneLinuxDesktop/chrome |
fwang | 15744c7 | 2016-11-08 13:58:33 | [diff] [blame] | 186 | ``` |
| 187 | |
Maksim Sisov | 0a0b748 | 2018-10-18 07:59:42 | [diff] [blame] | 188 | Or run for example the Wayland platform: |
| 189 | |
| 190 | ``` shell |
Maksim Sisov | c3642a6 | 2019-03-13 08:06:40 | [diff] [blame] | 191 | ./out/OzoneLinuxDesktop/chrome --ozone-platform=wayland |
Maksim Sisov | 0a0b748 | 2018-10-18 07:59:42 | [diff] [blame] | 192 | ``` |
| 193 | |
Maksim Sisov | fb1ab3d | 2021-11-08 06:34:40 | [diff] [blame] | 194 | It is also possible to choose an Ozone backend via the chrome://flags/#ozone-platform-hint. |
Kramer Ge | 5667ccd | 2024-07-18 20:47:25 | [diff] [blame] | 195 | The following options are available - Default, X11, Wayland, and Auto. "Auto" |
| 196 | selects Wayland if possible, X11 otherwise. |
Maksim Sisov | 69bc52c | 2020-09-30 06:30:38 | [diff] [blame] | 197 | |
Maksim Sisov | 69bc52c | 2020-09-30 06:30:38 | [diff] [blame] | 198 | |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 199 | ### GN Configuration notes |
| 200 | |
| 201 | You can turn properly implemented ozone platforms on and off by setting the |
| 202 | corresponding flags in your GN configuration. For example |
Peter McNeeley | 4ea922e | 2020-09-16 00:14:30 | [diff] [blame] | 203 | `ozone_platform_headless=false ozone_platform_drm=false` will turn off the |
| 204 | headless and DRM (GBM) platforms. |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 205 | This will result in a smaller binary and faster builds. To turn ALL platforms |
| 206 | off by default, set `ozone_auto_platforms=false`. |
| 207 | |
| 208 | You can also specify a default platform to run by setting the `ozone_platform` |
| 209 | build parameter. For example `ozone_platform="x11"` will make X11 the |
| 210 | default platform when `--ozone-platform` is not passed to the program. |
| 211 | If `ozone_auto_platforms` is true then `ozone_platform` is set to `headless` |
| 212 | by default. |
| 213 | |
| 214 | ## Running with Ozone |
| 215 | |
| 216 | Specify the platform you want to use at runtime using the `--ozone-platform` |
Peter McNeeley | 4ea922e | 2020-09-16 00:14:30 | [diff] [blame] | 217 | flag. For example, to run `content_shell` with the DRM (GBM) platform: |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 218 | |
| 219 | ``` shell |
Peter McNeeley | 4ea922e | 2020-09-16 00:14:30 | [diff] [blame] | 220 | content_shell --ozone-platform=drm |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 221 | ``` |
| 222 | |
| 223 | Caveats: |
| 224 | |
| 225 | * `content_shell` always runs at 800x600 resolution. |
Peter McNeeley | 4ea922e | 2020-09-16 00:14:30 | [diff] [blame] | 226 | * For the DRM (GBM) platform, you may need to terminate your X server (or any other |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 227 | display server) prior to testing. |
fwang | 399b51c | 2016-11-10 09:48:27 | [diff] [blame] | 228 | * During development, you may need to configure |
Tom Anderson | 93e49e49 | 2019-12-23 19:55:37 | [diff] [blame] | 229 | [sandboxing](linux/sandboxing.md) or to disable it. |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 230 | |
| 231 | ## Ozone Platforms |
| 232 | |
| 233 | ### Headless |
| 234 | |
| 235 | This platform |
| 236 | draws graphical output to a PNG image (no GPU support; software rendering only) |
| 237 | and will not output to the screen. You can set |
| 238 | the path of the directory where to output the images |
| 239 | by specifying `--ozone-dump-file=/path/to/output-directory` on the |
| 240 | command line: |
| 241 | |
| 242 | ``` shell |
fwang | 399b51c | 2016-11-10 09:48:27 | [diff] [blame] | 243 | content_shell --ozone-platform=headless \ |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 244 | --ozone-dump-file=/tmp/ |
| 245 | ``` |
| 246 | |
| 247 | ### DRM/GBM |
| 248 | |
| 249 | This is Linux direct rending with acceleration via mesa GBM & linux DRM/KMS |
| 250 | (EGL/GLES2 accelerated rendering & modesetting in GPU process) and is in |
derat | 8171050 | 2017-02-22 17:57:55 | [diff] [blame] | 251 | production use on [Chrome OS](https://www.chromium.org/chromium-os). |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 252 | |
derat | 8171050 | 2017-02-22 17:57:55 | [diff] [blame] | 253 | Note that all Chrome OS builds of Chrome will compile and attempt to use this. |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 254 | See [Building Chromium for Chromium OS](https://www.chromium.org/chromium-os/how-tos-and-troubleshooting/building-chromium-browser) for build instructions. |
| 255 | |
| 256 | ### Cast |
| 257 | |
| 258 | This platform is used for |
| 259 | [Chromecast](https://www.google.com/intl/en_us/chromecast/). |
| 260 | |
| 261 | ### X11 |
| 262 | |
| 263 | This platform provides support for the [X window system](https://www.x.org/). |
| 264 | |
Maksim Sisov | fb1ab3d | 2021-11-08 06:34:40 | [diff] [blame] | 265 | X11 is the default Ozone backend. You can try to compile and run it with the following |
| 266 | configuration: |
Maksim Sisov | 0c9db24 | 2019-11-22 06:20:35 | [diff] [blame] | 267 | |
| 268 | ``` shell |
Maksim Sisov | fb1ab3d | 2021-11-08 06:34:40 | [diff] [blame] | 269 | gn args out/OzoneX11 |
Maksim Sisov | 0c9db24 | 2019-11-22 06:20:35 | [diff] [blame] | 270 | ninja -C out/OzoneX11 chrome |
Maksim Sisov | fb1ab3d | 2021-11-08 06:34:40 | [diff] [blame] | 271 | ./out/OzoneX11/chrome |
Maksim Sisov | 0c9db24 | 2019-11-22 06:20:35 | [diff] [blame] | 272 | ``` |
| 273 | |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 274 | ### Wayland |
| 275 | |
| 276 | This platform provides support for the |
| 277 | [Wayland](http://wayland.freedesktop.org/) display protocol. It was |
| 278 | initially developed by Intel as |
| 279 | [a fork of chromium](https://github.com/01org/ozone-wayland) |
| 280 | and then partially upstreamed. |
Maksim Sisov | 0c9db24 | 2019-11-22 06:20:35 | [diff] [blame] | 281 | |
| 282 | Currently, the Ozone/Wayland is actively being developed by Igalia in |
| 283 | the Chromium mainline repository with some features missing at the moment. The |
| 284 | progress can be tracked in the [issue #578890](https://crbug.com/578890). |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 285 | |
fwang | 15744c7 | 2016-11-08 13:58:33 | [diff] [blame] | 286 | Below are some quick build & run instructions. It is assumed that you are |
fwang | 7af9db6 | 2017-01-09 14:52:22 | [diff] [blame] | 287 | launching `chrome` from a Wayland environment such as `weston`. Execute the |
Maksim Sisov | 0c9db24 | 2019-11-22 06:20:35 | [diff] [blame] | 288 | following commands (make sure a system version of gbm and drm is used, which |
| 289 | are required by Ozone/Wayland by design, when running on Linux platforms.): |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 290 | |
Maksim Sisov | fb1ab3d | 2021-11-08 06:34:40 | [diff] [blame] | 291 | Please note that the Wayland Ozone backend is built by default unless |
| 292 | `ozone_auto_platforms=false` is set (the same as the X11 Ozone backend). |
| 293 | |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 294 | ``` shell |
Maksim Sisov | fb1ab3d | 2021-11-08 06:34:40 | [diff] [blame] | 295 | gn args out/OzoneWayland |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 296 | ninja -C out/OzoneWayland chrome |
Maksim Sisov | 0a0b748 | 2018-10-18 07:59:42 | [diff] [blame] | 297 | ./out/OzoneWayland/chrome --ozone-platform=wayland |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 298 | ``` |
| 299 | |
Maksim Sisov | 0c9db24 | 2019-11-22 06:20:35 | [diff] [blame] | 300 | Native file dialogs are currently supported through the GTK toolkit. That |
| 301 | implies that the browser is compiled with glib and gtk enabled. Please |
| 302 | append the following gn args to your configuration: |
| 303 | |
| 304 | ``` shell |
| 305 | use_ozone=true |
| 306 | use_system_minigbm=true |
| 307 | use_system_libdrm=true |
| 308 | use_xkbcommon=true |
| 309 | use_glib=true |
| 310 | use_gtk=true |
| 311 | ``` |
| 312 | |
Orko Garai | f682a9b | 2025-03-06 22:50:03 | [diff] [blame] | 313 | Running some test suites requires a Wayland server. If you're not running one |
| 314 | you can use a locally compiled version of Weston or Mutter. This is what the |
| 315 | build bots do. Please note that this is required for interactive_ui_tests, as |
| 316 | those tests use a patched version of the compositor. |
| 317 | |
Orko Garai | 98c06a58 | 2025-03-11 19:52:46 | [diff] [blame] | 318 | Mutter and its dependencies are not checked out by default to keep the disk |
| 319 | usage optimal for most developers. In order to checkout mutter, add the |
| 320 | `checkout_mutter` custom var in your .gclient file and set it to `True` and run `gclient sync`. |
| 321 | |
| 322 | ``` |
| 323 | solutions = [ |
| 324 | { |
| 325 | "url": "https://chromium.googlesource.com/chromium/src.git", |
| 326 | "managed": False, |
| 327 | "name": "src", |
| 328 | "custom_deps": {}, |
| 329 | "custom_vars": { |
| 330 | "checkout_mutter": True, |
| 331 | }, |
| 332 | }, |
| 333 | ] |
| 334 | ``` |
| 335 | |
| 336 | For weston, simply add this to your gn args: |
James Cook | a6e9a7c | 2021-01-29 23:59:13 | [diff] [blame] | 337 | |
| 338 | ``` shell |
| 339 | use_bundled_weston = true |
| 340 | ``` |
| 341 | |
Orko Garai | f682a9b | 2025-03-06 22:50:03 | [diff] [blame] | 342 | |
Orko Garai | 98c06a58 | 2025-03-11 19:52:46 | [diff] [blame] | 343 | Then after building the test executable, run the xvfb.py wrapper script and tell |
| 344 | it to start the compositor with the tests: |
James Cook | a6e9a7c | 2021-01-29 23:59:13 | [diff] [blame] | 345 | |
| 346 | ``` shell |
| 347 | cd out/debug # or your out directory |
Orko Garai | f682a9b | 2025-03-06 22:50:03 | [diff] [blame] | 348 | ``` |
| 349 | ``` shell |
| 350 | # For weston |
Maksim Sisov | fb1ab3d | 2021-11-08 06:34:40 | [diff] [blame] | 351 | ../../testing/xvfb.py --use-weston --no-xvfb ./views_unittests --ozone-platform=wayland |
James Cook | a6e9a7c | 2021-01-29 23:59:13 | [diff] [blame] | 352 | ``` |
Orko Garai | f682a9b | 2025-03-06 22:50:03 | [diff] [blame] | 353 | ``` shell |
| 354 | # For mutter |
| 355 | ../../testing/xvfb.py --use-mutter --no-xvfb ./views_unittests --ozone-platform=wayland |
| 356 | ``` |
James Cook | a6e9a7c | 2021-01-29 23:59:13 | [diff] [blame] | 357 | |
Maksim Sisov | 0c9db24 | 2019-11-22 06:20:35 | [diff] [blame] | 358 | Feel free to discuss with us on freenode.net, `#ozone-wayland` channel or on |
| 359 | `ozone-dev`, or on `#ozone-wayland-x11` channel in [chromium slack](https://www.chromium.org/developers/slack). |
| 360 | |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 361 | ### Caca |
| 362 | |
| 363 | This platform |
| 364 | draws graphical output to text using |
| 365 | [libcaca](http://caca.zoy.org/wiki/libcaca) |
| 366 | (no GPU support; software |
| 367 | rendering only). In case you ever wanted to test embedded content shell on |
| 368 | tty. |
| 369 | It has been |
| 370 | [removed from the tree](https://codereview.chromium.org/2445323002/) and is no |
fwang | 7fa6daf7 | 2016-11-03 16:07:04 | [diff] [blame] | 371 | longer maintained but you can |
| 372 | [build it as an out-of-tree port](https://github.com/fred-wang/ozone-caca). |
| 373 | |
| 374 | Alternatively, you can try the latest revision known to work. First, install |
| 375 | libcaca shared library and development files. Next, move to the git revision |
| 376 | `0e64be9cf335ee3bea7c989702c5a9a0934af037` |
| 377 | (you will probably need to synchronize the build dependencies with |
| 378 | `gclient sync --with_branch_heads`). Finally, build and run the caca platform |
| 379 | with the following commands: |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 380 | |
| 381 | ``` shell |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 382 | gn args out/OzoneCaca \ |
| 383 | --args="use_ozone=true ozone_platform_caca=true use_sysroot=false ozone_auto_platforms=false toolkit_views=false" |
| 384 | ninja -C out/OzoneCaca content_shell |
fwang | 399b51c | 2016-11-10 09:48:27 | [diff] [blame] | 385 | ./out/OzoneCaca/content_shell |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 386 | ``` |
| 387 | |
| 388 | Note: traditional TTYs are not the ideal browsing experience.<br/> |
fwang | 63900272 | 2016-11-08 12:33:04 | [diff] [blame] | 389 |  |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 390 | |
Erik Chen | 96f8314 | 2022-06-15 20:43:25 | [diff] [blame] | 391 | ### drm |
| 392 | Ash-chrome client implementation. |
| 393 | |
Caroline Liu | ca634cb0 | 2023-08-29 16:19:07 | [diff] [blame] | 394 | ### flatland |
Erik Chen | 96f8314 | 2022-06-15 20:43:25 | [diff] [blame] | 395 | For fuchsia. |
| 396 | |
fwang | 8491a61 | 2016-10-31 20:59:45 | [diff] [blame] | 397 | ## Communication |
| 398 | |
| 399 | There is a public mailing list: |
| 400 | [[email protected]](https://groups.google.com/a/chromium.org/forum/#!forum/ozone-dev) |