The Chromium/Wayland project WebEngines Hackfest (Oct/2017) - - PowerPoint PPT Presentation

the chromium wayland project
SMART_READER_LITE
LIVE PREVIEW

The Chromium/Wayland project WebEngines Hackfest (Oct/2017) - - PowerPoint PPT Presentation

The Chromium/Wayland project WebEngines Hackfest (Oct/2017) Antonio Gomes, tonikitoo@ Maksim Sisov, msisov@ Agenda About Igalia Goals & Motivation Background Developments Demonstration About Igalia


slide-1
SLIDE 1

The Chromium/Wayland project

WebEngines Hackfest (Oct/2017)

Antonio Gomes, tonikitoo@ Maksim Sisov, msisov@

slide-2
SLIDE 2

Agenda

  • About Igalia
  • Goals & Motivation
  • Background
  • Developments
  • Demonstration
slide-3
SLIDE 3

About Igalia

  • Worker-owned, employee-run Open Source

consultancy company, based in Galicia, Spain.

slide-4
SLIDE 4

About Igalia

  • ~62 employees around the world.
  • Areas

○ Chromium/Blink, WebKit and Servo; ○ Compilers, JavaScript engines (V8, JSC); ○ Multimedia, Kernel, Networking; ○ Accessibility, Virtualization & Cloud.

slide-5
SLIDE 5

About Igalia

slide-6
SLIDE 6

Goals & Motivation

slide-7
SLIDE 7

Goal

  • Being able to run Chromium natively on

Wayland-based systems.

slide-8
SLIDE 8

Motivation

  • Wayland is a mature solution.
  • Demand from different industries.

− Automotive − Mobile − Desktop

slide-9
SLIDE 9

Background

slide-10
SLIDE 10

Background - Ozone/Wayland

  • By Intel / 01.org.
  • Ozone project (original).

○ Abstraction layer for the construction of accelerated surfaces underlying the Aura toolkit, as well as input devices assignment and event handling. ○ Backends: ■ DRI -> DRM

  • GBM
  • ChromeOS

■ Wayland (off trunk)

  • Linux
slide-11
SLIDE 11

Background - Ozone/Wayland

Browser process

desktop integration

Renderer process

x11 win

Browser process

desktop integration

Renderer process GPU process

  • zone platform

wayland connection

IPC (old API)

x11 win

  • zone/wayland

GPU process

Desktop integration Desktop integration (01.org)

slide-12
SLIDE 12

Background - Ozone/Wayland

  • Good community adoption.
  • Project entered in “maintenance mode”.

○ December/2015. ○ Chromium m49. ■ Today’s ToT is m63.

slide-13
SLIDE 13
  • In the meanwhile, Ozone layer in ToT received two new

backends: ○ x11 ○ wayland

Background - Cr Upstream (1/)

  • Is the problem solved?
  • The original “desktop integration” approach taken in

Ozone/Wayland did not comply with the way future Linux desktop Chrome is foreseen.

slide-14
SLIDE 14

Background - Desktop integration

Browser process Renderer process UI Service

desktop integration

  • zone / wayland

(connection)

IPC (Mojo API)

Mus Linux desktop integration

Gpu service (thread) Browser process

desktop integration

Renderer process GPU process

  • zone platform

wayland connection

IPC (old API)

Linux desktop integration (01.org)

x11 win

  • zone/wayland
  • zone / x11

Window Server

x11 win aura/mus

Browser process

slide-15
SLIDE 15

Background - Cr Upstream (2/)

  • Ozone project

− Abstraction layer for the construction of accelerated surfaces underlying the UI Service (aka Mus), as well as input devices assignment and event handling. − Backends: ■ ChromeOS

  • DRM / GBM
  • x11
  • Wayland

■ Linux

slide-16
SLIDE 16

New developments Phase 1 - The bring up

slide-17
SLIDE 17

Phase 1 - The bring up

  • Sept-Oct/16

○ Igalia brought up of Ozone’s Wayland backend in ToT. ○ Experimented with “Ozone != ChromeOS”. ○ Documentation ○ Buildbots

slide-18
SLIDE 18

Phase 1 - CrOS

  • Internal-window mode

○ CrOS has a Window Manager (WM) and a ScreenManager (SM). ○ Chrome and other app windows in the system ■ end up sharing a single display. ■ are embedded within a single top-level acceleratedWidget.

slide-19
SLIDE 19

Phase 1 - Desktop Chrome

  • External-window mode

○ Desktop Chrome has no WM.

■ One acceleratedWidget per Chrome window. ■ User manipulates acceleratedWidgets via the host OS window.

  • maximize, minimize, resizing, dragging, fullscreen.

○ Desktop Chrome has no SM.

slide-20
SLIDE 20

Phase 1 - Demo

  • Nov-Dec/16

○ CES demo: Linux/AGL/Wayland on R-Car M3.

○ meta-browser

slide-21
SLIDE 21

Phase 1 - Perf

  • Nov-Dec/16

○ Performance on BrowserBench GPU tests

slide-22
SLIDE 22

New developments

Phase 2 - Chrome / Mus

slide-23
SLIDE 23

Mus’ External Window Mode (1/)

  • Modify IWM so that it creates native

acceleratedWidget’s for each top-level window. ○ Extend Mus and Ozone to support ‘External Window’ mode.

  • No major functionality loss if compared to stock

Chrome.

slide-24
SLIDE 24

Mus’ External Window Mode (2/)

  • Extend the mus_demo to work in ‘external window’

mode.

  • Rework internal window mode assumptions in the

code ○ 1:1 relation of ws::Display and display::Display.

  • Extend Mus to support ‘external window mode’.
  • Extend Ozone to work on ‘external window’ mode.
  • Make the code that handles the existing –mus

command line parameter non-ChromeOS specific. ○ Chrome today launches the same way it ought to, for Chrome/Mus.

slide-25
SLIDE 25

Mus’ External Window Mode (3/)

  • Added support to:

○ XDG v6. ○ Keyboard events. ○ Mouse cursors. ○ Touch events (thanks to Collabora!). ○ Multiple windows. ○ Built-in window decoration. ○ Window closing. ○ Menus and widgets. ○ Support to common windowing features: ■ maximize, minimize, restore, fullscreen, dragging and resizing.

slide-26
SLIDE 26

Mus’ External Window Mode (4/)

  • Changed ownership model of some objects.
  • Implemented keyboard/IME service integration.
  • Implemented a slightly custom “window tree

hierarchy”.

  • Reworked our “access policy”.
  • Followed mushrome’s process model.
  • Worked extensively on stability and hardness of
  • ur impl.
slide-27
SLIDE 27

Mus’ External Window Mode (5/)

  • What is the status today?

Ready for alpha testing.

slide-28
SLIDE 28

Mus’ External Window Mode (6/)

  • Performance improvements (½)
slide-29
SLIDE 29

Mus’ External Window Mode (7/)

  • Performance improvements (2/2)
slide-30
SLIDE 30

Perf

  • May/17

○ Performance on BrowserBench GPU tests

slide-31
SLIDE 31

About the project (1/)

  • The project is being hosted on GitHub.
  • Well defined contribution policy:

○ Peer review. ○ Buildbot running existing tests: ■ services_unittests and ozone_unittests.

  • mus_demo_unittests (extended to launch

multiple windows).

slide-32
SLIDE 32

About the project (2/)

  • Rebase strategy:

○ Weekly based. ○ Continuous history clean up. ■ git commit --fixup <SHA> ■ Eliminate commit + revert “commit” pairs. ■ Use of [DoNotCarryForward] tag.

  • Periodic sync up with Google.
slide-33
SLIDE 33

TODO

  • Fix drag and drop.
  • Fix clipboard.

○ it works as in internal window mode.

  • Multi screen support.
  • Non-english keyboard layouts.
  • Ensure no feature losses or major performance

penalties when compared to stock Chromium X11/Linux.

  • Start to upstream the changes.
slide-34
SLIDE 34

TODO

  • Integration with AGL.
  • Release desktop installers (.deb .rpm).
slide-35
SLIDE 35

Breakout session

  • Upstream strategy

○ walkthrough of our impl. ○ wayland security review.

  • UI / GPU split

○ Future: musws and musgpu in separate processes. ○ https://crbug.com/643746

  • Mojo-fication of Ozone/Wayland.
slide-36
SLIDE 36

Questions?

tonikitoo@igalia.com - Antonio Gomes msisov@igalia.com - Maksim Sisov