2. Contents
● Introduction of Igalia
● Motivation
● Background
● History
● Demo
● Performance
● Todo list
● Plan to upstream
● Rebase strategy
● How to run Chromium wayland
2
3. Introduction of Igalia
● Worker-owned, employee-run open source consultancy company based
on Galicia, La Coruna, Spain
3
4. Introduction of Igalia (Cont.)
● ~60 employees around the world
● Areas
○ Chromium/Blink, WebKit, and Servo
○ Compilers, JavaScript engines (v8, JSC)
○ Multimedia (GStreamer), Graphics (Mesa), Networking, Accessibility
4
7. Motivation
● Various platforms have been adopting Wayland as their windowing
system
○ AGL, GENIVI, Raspberry Pi, Tizen, Bose, Volvo, Bosch, Jolla
○ Ubuntu 17.10 will ship Wayland by default
○ Fedora 25 is shipping Wayland by default
○ Major UI toolkits have built-in support, including Qt5, GTK+, Clutter,
EFL
7
8. Motivation (Cont.)
● There have been a lot of demands that Chromium works on Wayland in
the industries
● Wayland has been getting more complete
8
10. Background - X vs. Wayland
● Wayland is more light windowing system protocol in order to replace X
windowing system
X Wayland
VS.
10
11. Background - View and Widget
● Views
○ Views is a rendering system not unlike that used in WebKit or Gecko to render web pages. The user
interface is constructed of a tree of components called Views. These Views are responsible for rendering,
layout, and event handling. Each View in the tree represents a different component of the UI. An analog
is the hierarchical structure of an HTML document
○ View also has many custom views like other toolkits.
■ Label, image view, web view, slider, separator, link, button, combobox, and so on.
● Widget
○ At the root of a View hierarchy is a Widget, which is a native window. The native window receives
messages from Windows, converts them into something the View hierarchy can understand, and then
passes them to the RootView. The RootView then begins propagation of the event into the View
hierarchy[7]
11
12. Background - View and Widget (Cont.)
● Chromium UI is constructed of a tree of view components
12
Widget
Root view
Child View Child View Child View Child View Child View Child View Child View
Child ViewChild View
Child View
[8]
13. Background - Aura
● Aura
○ To be brief, Aura is UI framework working
on Chrome OS/Chromium
○ Aura provides window and event types, as
well as interfaces to customize their
behavior
○ Ash uses the views UI toolkit (e.g.
views::View, views::Widget, etc.) backed by
the aura native widget and layer
implementations
○ Aura was intended to improve browser UI
with visual enhancements, which are
supported by GPU acceleration to make
everything smoother[5]
13
14. Background - Aura (Cont.)
● Event Flow
Widget
Aura Shell
X or Wayland
Kernel
Mouse click [8]
Ozone
15. Background - Aura (Cont.)
● Aura Shell
○ A shell is software that provides an
interface for users of an operating system
to access the services of a kernel[8]
15
Kernel
X or Wayland
GTK
application
QT
application
Shell
16. Background - Aura (Cont.)
● Aura Shell (Cont.)
○ Window Manager, Launcher, ChromiumOS
settings input method
○ Part of Browser process
○ Now it is called “Classic Shell” and will be
removed
16
17. Background - Aura (Cont.)
17
views::NativeWidgetAura
aura::Window
native_widget_factory.cc
CreateNativeWidget()
chrome_views_delegate_win.cc
ChromeViewsDelegate::CreateNativeWidget()
chrome_views_delegate_linux.cc
ChromeViewsDelegate::CreateNativeWidget()
chrome_views_delegate_chromeos.cc
ChromeViewsDelegate::CreateNativeWidget()
ash::Shell::GetPrimaryRootWindow()
Aura
Views
Chrome
● Example of creating a native widget
18. Background - Aura (Cont.)
● Drawing
○ Each Aura Window owns a
corresponding compositor layer
○ The window manager and system UI for
Chrome OS
○ Use the views UI toolkit (e.g. views::View,
views::Widget, etc.) backed by the aura
native widget and layer implementations
18
[9]
19. Background - Ozone
● Ozone
○ Goal is to enable chromium to be
used in a wide variety of projects by
making porting to new platforms
easy
○ Ozone consists in a set of c++
classes for abstracting different
window systems on Linux. It
provides abstraction for the
construction of accelerated surfaces
underlying Aura UI framework,
input devices assignment and event
handling
19
20. Background - Ozone (Cont.)
● Ozone (Cont.)
○ Abstraction layer for the construction of accelerated surfaces underlying the Aura toolkit
○ Process input devices assignment and event handling
20
Ozone
Ozone-Wayland Ozone-X11 Ozone-GBM
Window System (X, Wayland, etc)
Kernel
Components Content Module
Aura
ui/base, ui/event
Chromium
[6]
23. History
● Ozone/Wayland project had been started by Intel since 2014 as their own
Opensource project
● The project entered maintenance mode in December 2015
● However, there was conflicts between Intel’s implementation and
Google’s plan
○ Intel’s implementation vs. Chromium servicification
23
24. History (Cont.)
● Eventually Intel stopped managing the Ozone/Wayland project
VS.
Architecture of Intel’s implementation New architecture on servicification
24
[2]
25. History (Cont.)
● Igalia decided to start a new project with same end goal with Intel
○ We fixed Ozone’s Wayland backend in Chromium mainline
○ Didn’t start to upstream
● Succeed to launch a content shell
on ozone/wayland
25
[1]
26. History (Cont.)
● Igalia got in touch with Google/Chromium developers to understand their
plans for Ozone/wayland
○ Servicification
○ Mus/Ash
■ Mus is Mandoline UI Service
■ Separate the window management and shell functionality of ash from the chrome
browser process. The benefit is performance isolation for system components
outside of the browser, and a sharper line between what components are
considered part of the ChromeOS UX and what are part of the browser
● Igalia decided to follow up Chromium’s new architecture for
Ozone/Wayland
26
27. History (Cont.)
● Start to work on Ozone/Wayland in earnest
○ Some problems at that time prior to Sep. 2016
■ Partial upstream from original Intel’s project
■ Insufficient documentation
■ Limited buildbot coverage
● Improved by Igalia
○ Brought up of Ozone’s Wayland backend in Chromium trunk
○ Start experimenting with Ozone on Chromium desktop as well
○ Documentation
○ Setup buildbots
○ Design discussion with Robert Kroeger who is a lead UI framework at Google
27
28. History (Cont.)
- Finally Igalia exhibited initial Chromium Wayland on R-Car M3 board at
CES 2016
28
32. Performance
● In some benchmarks,
Ozone/Wayland is still a
slightly lower performance
compared to X11 version
❏ System under test
❏ HW: Dell XPS15
❏ CPU: i7 cpu
❏ RAM: 16GB
❏ Source : Igalia Ozone wayland github on
27th Sep.
● Bigger score is better
32
33. Performance (Cont.)
● After rebasing Ozone/Wayland version based on Chromium m62,
rendering performance is much faster than before on R-Car m3 board
33
35. Todo list
● 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
● Window Closing
● Started upstreaming the changes
35
36. Plan to upstream
● In WebEngine Hackfest on 1-3 October 2017, Antonio and Maksim have
talked with Robert (Lead of Ozone at Google) about the upstream plan.
○ Changes will be split in two big parts
○ We will start upstreaming one of them immediately
36
37. Rebase strategy
● Ozone wayland has been developed at github
○ https://github.com/Igalia/chromium
● Rebased every week against Chromium ToT. Our goal is to be as close as
possible to the latest Chromium code
○ Every week, a member of the Igalia Chromium team takes the rebase shift.
○ Commits that are complementary of each other, receive a "fixup!" prefix on the commit title, and keep the rest
of original commit title unchanged.
37
38. How to run Chromium Wayland
● Steps
○ Setup Chromium build environment first
■ Install depot_tools and clone Chromium source code
○ Get Chromium Wayland branch from Igalia github
■ $ git remote add Igalia https://github.com/Igalia/chromium.git
■ $ git fetch Igalia
■ $ git checkout ozone-wayland-dev
○ Configuration
■ $ gn args out/Ozone --args="use_ozone=true enable_mus=true use_xkbcommon=true is_debug=false"
○ Build
■ $ ninja -C out/Ozone chrome
○ Run
■ $ ./out/Ozone/chrome --mus --ozone-platform=wayland
38
39. LGE Chromium upstream
1. Google Group for the LGE corporate CLA
a. https://groups.google.com/forum/#!forum/lge-chromium-contribution
2. LGE Chromium commit counter
a. VS. Samsung - http://samsung.github.io/Chromium/
b. https://chromiumgitcoutner.github.io/lge-chromium-contribution-stats/ (Ongoing)
3. Instruction how to upload your CL to Chromium gerrit
a. https://wiki.lgsvl.com/display/webOSDocs/Contributing+to+upstream+chromium+guide
39
40. Reference
1. The Chromium project’s way to Wayland written by Antonio Gomes(tonikitoo)
2. Update on the open source browser space written by Jacobo Aragunde Pérez
3. Ozone-Wayland Architecture written by Intel
4. Google looking for Linux Chrome Aura testers
5. Google to replace GTK+ with its own Aura in Chrome
6. https://github.com/ds-hwang/yocto-chromium
7. https://www.chromium.org/developers/design-documents/chromeviews
8. https://www.slideshare.net/gnomekr/chromium-ui-frameworkshared
9. https://dev.chromium.org/developers/design-documents/aura/graphics-architecture
10. https://chromium.googlesource.com/chromium/src/+/master/docs/ozone_overview.md
40
41. Thank you!
gkim@igalia.com - Gyuyoung Kim
tonikitoo@igalia.com - Antonio Gomes
mscho@igalia.com - Mi Sun Silvia Cho
msisov@igalia.com - Maksim Sisov
41
Drag&Drop, Screen orientation, IME, Touch, Window, etc.
Mus+ash
Ash is transitioning to use the mus window server and gpu process, found in //services/ui. Ash continues to use aura, but aura is backed by mus. Code to support mus is found in //ash/mus. There should be relatively few differences between the pure aura and the aura-mus versions of ash. Ash can by run in mus mode by passing the --mus command line flag.
Ash is also transitioning to run as a mojo service in its own process. This means that code in chrome cannot call into ash directly, but must use the mojo interfaces in //ash/public/interfaces.
Out-of-process Ash is referred to as “mash” (mojo ash). In-process ash is referred to as “classic ash”. Ash can run in either mode depending on the --mash command line flag.
Content module uses ozone for cursor.
Thank you for listening to my presentation. If you have any questions about Chromium wayland, please contact us. Antonio Gomes, Mi Sun Silvia Cho, Maksim Sisov, and me.