You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Linux: Add ozone/mus support as an alternative to X11 #2296
Currently Ozone builds in chromium doesn’t work as it has dependency on mus framework.
Ozone would work only when mus is enabled inside chromium.
At Collabora, we have already ported CEF[1] to use ozone platform(wayland) through mus and we want to upstream those changes to CEF main repository.
Once mus/ozone is enabled, CEF can be built for different ozone platforms(x11, wayland) by using ozone-wayland-dev branch. Wayland support is being actively developed in
ozone-wayland-dev branch and is going to merge in chromium main tree soon.
Thanks for sharing this, it sounds very interesting. We'll need to review your changes and the testing/support requirements to determine whether it makes sense to merge your changes into the main CEF repository. Please provide the following information to assist our review:
An overview of the architectural changes that you made to CEF.
A PR against current CEF master containing your changes.
Instructions on how to build and test CEF with your changes.
I prepared the branch for MUS support with latest CEF. It also covers issue #1989
by putting X11 under compile time flags. There is no architectural changes in CEF,
Mus is already supported in chromium and we need to implement missing bits in CEF
(e.g adding service manifest, starting mus client and service registration).
When CEF is built with use_ozone=true, it automatically uses MUS framework.
Once Mus support is enabled, it can be built with ozone-wayland-dev branch for ozone/wayland.
Since mus/ozone/wayland is done externally in ozone-wayland-dev we would have to port CEF a bit for ozone-wayland-dev
until these work are merged with chromium main tree.
So I have prepared specific branches where ozone/wayland/MUS can be tested.
Notes:
Once launched with --use-views, CEF uses ozone/wayland.
To use Cefsimple Without --use-views won't work as of now since it would require
porting of browser_platform_delegate_native_linux.cc for wayland.
@Santosh_Collabora Thanks for the detailed information. Given the complexity that you describe it sounds like we should wait for the ozone/wayland changes to land in Chromium before attempting to merge your changes to CEF. Is https://crbug.com/578890 the most relevant issue to watch for the ozone/wayland changes in Chromium?
Once launched with --use-views, CEF uses ozone/wayland. To use Cefsimple Without --use-views won't work as of now since it would require porting of browser_platform_delegate_native_linux.cc for wayland.
Requiring Views in combination with ozone/mus sounds reasonable to me.
Apology, if I made it complex in explanation, It looks complex because I explained all the way to enable wayland platform working with CEF(When mus is available) and for that we need to depend on externally ozone-wayland-dev which is hard.
But my idea here is to get only MUS support in CEF , which means upgrading CEF code for latest chromium architectural changes(MUS related) thus making CEF in sync with chromium. As obvious, I don't expect ozone/wayland to work straightway. Its advantage will be visible once chromium moves to MUS( ozone-wayland-dev branch is merged). As of now I recommend taking this patch as this will mantained over time and CEF will be ready for chromium MUS based architectural changes.
Also MUS/Ozone/wayland can work with chromium without ozone-wayland-dev branch merge, Its broken right now but could be fixed with little effort. It actually works in linux chromium build with GN defines target_os=chromeos ( but building for linux) is used.
@Santosh_Collabora We generally only merge changes when they can be tested as part of CEF's normal development flow. Supporting Wayland (and providing automated builds for that platform) seems reasonable once the necessary support has been merged to Chromium. Prior to that point I think it's better for you to maintain the changes in your separate branch.
Since now chromium official repository supports ozone build, all the complicacy has been eliminated and I have pushed the fresh patch to support ozone build with CEF.
With this now, CEF can be built with different ozone platform like Wayland, X11 etc.
I would appreciate if you could review this patch.
I have personally verified that it doesn't regress anything in CEF default build, and works fine with Wayland and X11 platform when --use-views is enabled.
To test this patch, build CEF with following GN_DEFINES: use_ozone=true use_intel_minigbm = true (varies for gpu type).
and then run as : $ ./out/Release/cefsimple --use-views --ozone-platform=wayland
@magreenblatt : I have updated the patch, It would be great if you could review patch again, as it would be nice to get it reviewed and land this patch which will enable ozone build of CEF to use wayland.
Linux: Add support for ozone builds (fixes issue #2296).
Ozone builds can run with different platform backends (Wayland, X11, etc). Usage of the Views framework is required, and the cefclient sample application is not supported.
Example usage:
$ export GN_DEFINES="use_ozone=true"
$ cd /path/to/chromium/src/cef
$ ./cef_create_projects.sh
$ cd /path/to/chromium/src
$ ninja -C out/Release_GN_x64 cefsimple
$ ./out/Release_GN_x64/cefsimple --use-views --ozone-platform=wayland
Binary distributions can be created by passing the --ozone flag to make_distrib.py.
This option has changed to ozone_platform_x11=false. All Linux builds currently use Ozone, and the X11 platform is enabled by default. However, Chromium no longer has a link-time dependency on libX11 so the practical results of adding ozone_platform_x11=false are:
Remove --ozone-platform=X11 as a runtime option
Default to Wayland as the Ozone platform
Remove #define CEF_X11 1 from include/cef_config.h
Exclude X11-specific code in CEF and Chromium (via defined(CEF_X11) or BUILDFLAG(IS_OZONE_X11))
Activity
magreenblatt commentedon Nov 6, 2017
Original changes by santosh mahto (Bitbucket: Santosh_Collabora).
magreenblatt commentedon Nov 6, 2017
Thanks for sharing this, it sounds very interesting. We'll need to review your changes and the testing/support requirements to determine whether it makes sense to merge your changes into the main CEF repository. Please provide the following information to assist our review:
magreenblatt commentedon Nov 8, 2017
Original comment by santosh mahto (Bitbucket: Santosh_Collabora).
Thanks for showing interest.
I prepared the branch for MUS support with latest CEF. It also covers issue #1989
by putting X11 under compile time flags. There is no architectural changes in CEF,
Mus is already supported in chromium and we need to implement missing bits in CEF
(e.g adding service manifest, starting mus client and service registration).
When CEF is built with use_ozone=true, it automatically uses MUS framework.
Once Mus support is enabled, it can be built with ozone-wayland-dev branch for ozone/wayland.
Since mus/ozone/wayland is done externally in ozone-wayland-dev we would have to port CEF a bit for ozone-wayland-dev
until these work are merged with chromium main tree.
So I have prepared specific branches where ozone/wayland/MUS can be tested.
CEF:
branch:https://bitbucket.org/Santosh_Collabora/cef/branch/Santosh/cef_mus_ozone_wayland
This branch already have current changes for mus support(latest 3 CLs) with some additional patches
required for ozone-wayland-dev, also it avoids applying CEF chromium patches instead all those patches
are already commited on corresponding ozone-wayland-dev branch with fixup's.
ozone-wayland-dev :
origin: https://git.collabora.com/git/cef-wayland/chromium.git
branch: cef-wayland-rebase
As said,In this branch CEF patches are already applied with ozone-wayland-dev related fixup's
There are some additonal commits some of they are not required but good to take.
Build steps:
Clone both the sources CEF & chromium and move to above mentioned branches.
Launch:
Install weston shell and Launch.
Notes:
Once launched with --use-views, CEF uses ozone/wayland.
To use Cefsimple Without --use-views won't work as of now since it would require
porting of browser_platform_delegate_native_linux.cc for wayland.
Let me know if you have any questions.
magreenblatt commentedon Nov 8, 2017
@Santosh_Collabora Thanks for the detailed information. Given the complexity that you describe it sounds like we should wait for the ozone/wayland changes to land in Chromium before attempting to merge your changes to CEF. Is https://crbug.com/578890 the most relevant issue to watch for the ozone/wayland changes in Chromium?
If you would like an initial review of your code changes you're welcome to submit a PR as described at https://bitbucket.org/chromiumembedded/cef/wiki/ContributingWithGit.md#markdown-header-creating-a-pull-request
Requiring Views in combination with ozone/mus sounds reasonable to me.
magreenblatt commentedon Nov 8, 2017
Issue #1989 was marked as a duplicate of this issue.
magreenblatt commentedon Nov 8, 2017
magreenblatt commentedon Nov 8, 2017
Original comment by santosh mahto (Bitbucket: Santosh_Collabora).
Apology, if I made it complex in explanation, It looks complex because I explained all the way to enable wayland platform working with CEF(When mus is available) and for that we need to depend on externally ozone-wayland-dev which is hard.
But my idea here is to get only MUS support in CEF , which means upgrading CEF code for latest chromium architectural changes(MUS related) thus making CEF in sync with chromium. As obvious, I don't expect ozone/wayland to work straightway. Its advantage will be visible once chromium moves to MUS( ozone-wayland-dev branch is merged). As of now I recommend taking this patch as this will mantained over time and CEF will be ready for chromium MUS based architectural changes.
magreenblatt commentedon Nov 8, 2017
Original comment by santosh mahto (Bitbucket: Santosh_Collabora).
Also MUS/Ozone/wayland can work with chromium without ozone-wayland-dev branch merge, Its broken right now but could be fixed with little effort. It actually works in linux chromium build with GN defines target_os=chromeos ( but building for linux) is used.
magreenblatt commentedon Nov 8, 2017
@Santosh_Collabora We generally only merge changes when they can be tested as part of CEF's normal development flow. Supporting Wayland (and providing automated builds for that platform) seems reasonable once the necessary support has been merged to Chromium. Prior to that point I think it's better for you to maintain the changes in your separate branch.
magreenblatt commentedon Nov 9, 2017
Original comment by santosh mahto (Bitbucket: Santosh_Collabora).
@magreenblatt : Ok, I keep the branch in my private repo.
Lets have initial review of PR. Pull request is here
https://bitbucket.org/chromiumembedded/cef/pull-requests/128/santosh-cef-mus-support/diff
magreenblatt commentedon Jan 7, 2019
Original comment by santoshmahto (Bitbucket: santoshmahto, GitHub: santoshmahto).
@magreenblatt :
Since now chromium official repository supports ozone build, all the complicacy has been eliminated and I have pushed the fresh patch to support ozone build with CEF.
With this now, CEF can be built with different ozone platform like Wayland, X11 etc.
I would appreciate if you could review this patch.
I have personally verified that it doesn't regress anything in CEF default build, and works fine with Wayland and X11 platform when --use-views is enabled.
To test this patch, build CEF with following GN_DEFINES: use_ozone=true use_intel_minigbm = true (varies for gpu type).
and then run as : $ ./out/Release/cefsimple --use-views --ozone-platform=wayland
magreenblatt commentedon Feb 20, 2019
Original comment by santoshmahto (Bitbucket: santoshmahto, GitHub: santoshmahto).
@magreenblatt : I have updated the patch, It would be great if you could review patch again, as it would be nice to get it reviewed and land this patch which will enable ozone build of CEF to use wayland.
https://bitbucket.org/chromiumembedded/cef/pull-requests/128/santosh-cef-mus-support/diff
magreenblatt commentedon Mar 5, 2019
Original comment by santosh mahto (Bitbucket: Santosh_Collabora).
@magreenblatt : any chance to look at PR again, I have updated the branch.
PR: https://bitbucket.org/chromiumembedded/cef/pull-requests/128/santosh-cef-mus-support/diff
magreenblatt commentedon Mar 26, 2019
Original comment by santoshmahto (Bitbucket: santoshmahto, GitHub: santoshmahto).
Here is screenshot of cefsimple ozone build run on wayland platform (weston shell)

Used build command :
export GN_DEFINES = "use_ozone=true"
ninja -C out/Release_GN_x64/ cefsimple
Run : ../out/Release_GN_x64/cefsimple --use-views --ozone-platform=wayland
magreenblatt commentedon Apr 23, 2019
Linux: Add support for ozone builds (fixes issue #2296).
Ozone builds can run with different platform backends (Wayland, X11, etc). Usage of the Views framework is required, and the cefclient sample application is not supported.
Example usage:
$ export GN_DEFINES="use_ozone=true"
$ cd /path/to/chromium/src/cef
$ ./cef_create_projects.sh
$ cd /path/to/chromium/src
$ ninja -C out/Release_GN_x64 cefsimple
$ ./out/Release_GN_x64/cefsimple --use-views --ozone-platform=wayland
Binary distributions can be created by passing the
--ozoneflag to make_distrib.py.→ <<cset 491253fa0371 (bb)>>
magreenblatt commentedon Apr 23, 2019
magreenblatt commentedon Oct 6, 2021
Original comment by Julien Isorce (Bitbucket: Julien Isorce).
Hi, does it work with --ozone-platform=headless ? Thank you
Linux: Add support for ozone builds (fixes issue chromiumembedded#2296).
magreenblatt commentedon Sep 26, 2024
This option has changed to
ozone_platform_x11=false. All Linux builds currently use Ozone, and the X11 platform is enabled by default. However, Chromium no longer has a link-time dependency on libX11 so the practical results of addingozone_platform_x11=falseare:--ozone-platform=X11as a runtime option#define CEF_X11 1frominclude/cef_config.hdefined(CEF_X11)orBUILDFLAG(IS_OZONE_X11))linux: Add a Wayland embedding sample (see chromiumembedded#2804)
linux: Add a Wayland embedding sample (see chromiumembedded#2804)