GithubHelp home page GithubHelp logo

qjia7 / ozone-wayland Goto Github PK

View Code? Open in Web Editor NEW

This project forked from intel/ozone-wayland

0.0 3.0 0.0 1.96 MB

Wayland implementation for Chromium Ozone classes

License: BSD 3-Clause "New" or "Revised" License

C++ 84.44% Python 0.87% Shell 0.57% C 9.94% Objective-C 4.18%

ozone-wayland's Introduction

Introduction

Ozone-Wayland is the implementation of Chromium's Ozone for supporting Wayland graphics system. Different projects based on Chromium/Blink like the Chrome Browser, Chrome OS, Crosswalk, among others can be enabled now using Wayland.

Alt text

Contents

Design

Ozone is a set of classes in Chromium 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:

Alt text

Before, when using Aura on Linux all the native windowing system code (X11) was spread throughout Chromium tree. Now the idea is that Ozone will abstract the native code and because it's a set of class factories, it will switch for whatever is the window system.

One of the biggest advantages of Chromium Ozone is that it allows to implement the window system details externally from the Chromium tree, which is great because it is where the loaded work situates in many cases. Therefore, Ozone-Wayland can be seen as a sibling project of Chromium where one is empowering the other with different characteristics. Besides Ozone-Wayland, there are different Ozone implementations like KMS/DRM, caca, etc

Howto

We use Ubuntu 12.04 LTS (Precise Pangolin), 32/64-bit but a kernel from Raring though. One can install it pretty easily just sudo apt-get install linux-generic-lts-raring. This version is needed for using Mesa master 9.3.0-devel, a requirement for Weston. Besides, make sure you have at least 25 GB of disk space to store all the sources and a few targets to be compiled (with debugging symbols).

Firstly you'd need to set up the Wayland libraries (version >= 1.4.0), and the Weston reference compositor that you will be running Chromium onto. The information on Wayland's web page should be enough for doing so:

http://wayland.freedesktop.org/building.html

Please note that at the moment support for Wayland's XDG Shell protocol only works with the 1.5 series.

Make sure everything is alright now, setting up the environment variable $XDG_RUNTIME_DIR and playing a bit with the Wayland clients, connecting them on Weston.

Then you'd need some distribution tools and development packages :

$ sudo apt-get install gperf libnss3-dev libpulse-dev libdbus-1-dev libexif-dev libpci-dev libpango1.0-dev libelf-dev libcap-dev libasound2-dev libssl-dev libcups2-dev libgconf2-dev libgnome-keyring-dev

If you are running a 64-bit Ubuntu distribution, you'd additionally need :

$ sudo apt-get install ia32-libs

Then on Chromium's side, we need to setup Chromium's tree together with the Ozone-Wayland implementation. For that you need to use gclient to clone Ozone-Wayland; but first you need to download depot_tools and configure it. Say your Chromium top-level will be in ~git/chromium, you will need:

$ mkdir -p ~git/chromium
$ cd ~git/chromium
$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
$ export PATH=`pwd`/depot_tools:"$PATH"

now we can clone Ozone-Wayland and fetch all the dependencies of it, including Chromium itself:

$ gclient config ssh://[email protected]/01org/ozone-wayland.git --name=src/ozone --git-deps
$ GYP_DEFINES='use_ash=1 use_aura=1 chromeos=0 use_ozone=1' gclient sync

It may take a considerable time for downloading the trees. If everything went fine, now we're able to build.

For now, also apply some patches:

./src/ozone/patches/patch-chromium.sh

TIP: to speed up debug builds you can disable Blink debugging symbols by setting remove_webcore_debug_symbols=1 in GYP_DEFINES.

Note that in Chromium, gyp uses pkg-config for checking where are Wayland libraries on the system, so double check that you are not mixing some that was already there with latest that you just got and compiled from git.

TIP: if you followed Wayland's web page instructions, then you probably want to set the PKG_CONFIG_PATH variable as $HOME/install and add it in your .bashrc to be as default.

Now we can conclude compiling a few targets like Content Shell (content_shell) or the Chromium browser:

$ cd src/
$ ./build/gyp_chromium
$ ninja -C out/Debug -j16 chrome

(if you get any build errors, please execute "git log" and verify that the first "commit" line matches the "chromium_rev" one found in src/ozone/.DEPS.git. If it doesn't, run "git checkout $ID", apply the patches and compile again)

That's all. At this point you should be able to connect Chromium on Weston using:

$ ~/git/weston/src/weston &
$ ./out/Debug/chrome --no-sandbox

###Working with Ozone-Wayland Release branch:

Instructions can be found here: https://github.com/01org/ozone-wayland/wiki/Releasing#wiki-releasebranch

Gardening

We pin chromium to a particular revision in order to keep upstream changes from breaking our build. Updating that revision to a newer one and fixing any resulting breakage is called gardening. To sync a different version of chromium, update chromium_rev in .DEPS.git to a newer revision then run the gclient sync again. Fix any build errors, and commit both changes.

Contributing

Instructions can be found here: https://github.com/otcshare/ozone-wayland/wiki

License

Ozone-Wayland's code uses the BSD license (check the LICENSE file in the project).

ozone-wayland's People

Contributors

dnarvaez avatar ds-hwang avatar kalyankondapally avatar michaelforney avatar mspang avatar patrickheeb avatar qjia7 avatar rakuco avatar tiagovignatti avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.