Explainer: Aura and Ash #defines & dependencies

1316 views
Skip to first unread message

Ben Goodger (Google)

unread,
Mar 19, 2012, 5:34:05 PM3/19/12
to Chromium-dev
If you don't touch code in src/chrome you can probably ignore this.

Aura vs. Ash

Aura is evolving to encompass more than just the window manager/shell environment work for ChromeOS. I'm going to attempt to spell out some of the differences here so that it's clear what defines to use in code and to help everyone get a better understanding.

Aura is the hardware accelerated UI framework built on CC.[1] 
Ash (the Aura SHell[2]) is the ChromeOS window manager, desktop environment etc. Ash depends on Aura and Views. Ash is built with use_ash=1 in your GYP_DEFINES, which #defines USE_ASH. This also implies USE_AURA.

At the time of writing, it's not really possible to have a build of Chrome using Aura without Ash, since there's no one to set up the container that hosts the environment. This is changing. Elliot is working on self-hosting Aura in Views. What this means is there'll be a Chrome build on Linux that can be enabled by specifying use_aura=1 in your GYP_DEFINES, which #defines USE_AURA (not USE_ASH).

Are you confused yet?

Think of it this way. Aura is the accelerated window framework. We built a window manager (ash) on top of it for ChromeOS. We are conducting initial explorations to determine how we can use this underlying framework for UI in non-ChromeOS. If we can get it to work, it means we'll be able to do some of the cool things we're able to do on ChromeOS on other platforms.

What does this mean for the developer?

Not much, except that many of the places we use #if defined(USE_AURA) in src/chrome were wrong, and Elliot's had to fix them. If you're doing something ChromeOS-specific, it's probable that unless it reflects an Aura framework change, it needs to be #if defined(USE_ASH) instead.

Any other dependency things I should be aware of?

James Cook produced a nice diagram here showing the basic dependencies:


But also note that Ash is a pretty high level thing (with user features etc) and so src/content is also not allowed to know about it, though src/content is allowed to know about Aura.

-Ben

[1] We actually use a small shim API between us and CC, which lives in src/ui/gfx/compositor right now. ui::Layer wraps a WebLayer.
[2] Yes I know there's a Unix shell called ash. Sorry. It was either this, or AuraProxyStubImplHostDelegateFactoryStubProxyViewImpl.

James Ausmus

unread,
Mar 27, 2012, 6:39:24 PM3/27/12
to Chromium-dev
Hi-

On Mar 19, 2:34 pm, "Ben Goodger (Google)" <b...@chromium.org> wrote:
<snip>
> At the time of writing, it's not really possible to have a build of Chrome
> using Aura without Ash, since there's no one to set up the container that
> hosts the environment. *This is changing.* Elliot is working on
> self-hosting Aura in Views. What this means is there'll be a Chrome build
> on Linux that can be enabled by specifying use_aura=1 in your GYP_DEFINES,
> which #defines USE_AURA (not USE_ASH).

What's the current status of this effort? I'm investigating what it
will take to get Chromium running on Wayland via Aura, without using
the Ash wm, and haven't been able to find a lot out about what it will
take to separate Aura from Ash.

Thanks!

-James

Elliot Glaysher (Chromium)

unread,
Mar 27, 2012, 6:45:31 PM3/27/12
to james....@intel.com, Chromium-dev
On Tue, Mar 27, 2012 at 3:39 PM, James Ausmus <james....@intel.com> wrote:
> What's the current status of this effort? I'm investigating what it
> will take to get Chromium running on Wayland via Aura, without using
> the Ash wm, and haven't been able to find a lot out about what it will
> take to separate Aura from Ash.

What it will take is a lot more work. I'm still trying to get a
working, unrooted window up using the aura compositor without the ash
desktop.

-- Elliot

Ausmus, James

unread,
Mar 28, 2012, 1:39:54 PM3/28/12
to Elliot Glaysher (Chromium), Chromium-dev

OK, then two follow-up questions:

1. What order of magnitude of work/time are we looking at - a month,
6, a year, ?
2. What could someone do to jump in and help? :)


Thanks!

-James


>
> -- Elliot

Ben Goodger (Google)

unread,
Mar 28, 2012, 1:44:25 PM3/28/12
to james....@intel.com, Elliot Glaysher (Chromium), Chromium-dev
Here's the guidance I typically give when starting a project like this, since it resembles a port:

- Find something small to bite into, but which will give you quick feedback and allow you to sense whether or not you're going in the right direction.

I've recommended this approach to Elliot, so here's how he's planning on proceeding with this work:

1. Get the aura_demo to build and run, without glitches (easy, there's no events)
2. Get the views_examples to build and run, without glitches (this one is tougher, as it requires a new aura client implementation, and some more thought given to event handling).
3. Once we have good abstractions in place that support views_examples, only then consider chrome itself. I don't think we're close to having #2 sorted yet so it's premature to think about this step.

-Ben



>
> -- Elliot

--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
   http://groups.google.com/a/chromium.org/group/chromium-dev

Omar Belkhodja

unread,
Nov 9, 2012, 1:43:06 AM11/9/12
to chromi...@chromium.org, james....@intel.com, Elliot Glaysher (Chromium)
Hello Guys,

How did this subject evolve ? Is step 2 acheived now ? Are we in step 3 ? Are these modifications merged into the main repositiory ? I would be interested in participating :)

Thanks !

Stuart Bentley

unread,
Jan 29, 2013, 5:48:40 AM1/29/13
to chromi...@chromium.org
With the way this is set up, is there a way to compile Chrome/Chromium for Linux that allows the use of any window manager (so, outside a ChromeOS environment), while behaving as it would under Ash (ie. deferring tab handling to the WM by treating each tab as a window)?

Mike Frysinger

unread,
Jan 29, 2013, 11:41:29 AM1/29/13
to stu...@testtrack4.com, chromium-dev
if you build it for ChromeOS in a Linux system, you can run it and get
a "window" that Chrome itself manages
-mike
Reply all
Reply to author
Forward
0 new messages