Life in X land

Keith Packard

freedesktop.org

Outline

Window level compositing

what we want

How it works

Demo

Future Desktop Architecture

Integrated 3D

X community status

Freedesktop.org, X.org, XFree86

where we want to go

Eye-Candy in X

Translucent windows

Magnifiers

Window animation

Flash-free window manipulation

Translucent Windows

Windows with alpha channel

Translucent windows

Shaped windows

Windows with global alpha

Fading windows

Window manager interactions

Magnifiers

Passive redisplay of application content

Access hidden content

Accessibility

Similar to thumbnails

Window Animation

Zoom actual window contents

Exposé

Translucent move/resize

No More Flashing

Traditional X window management

Visible window management effects

Visible window exposure

New plan

Double buffered desktop

Double buffered applications

Cooperative buffer updates

Window contents consistent

How It Works

Off-screen window contents

Programmatic screen update

New “Compositing Manager”

Inter-client synchronization

Three new extensions

Composite Diagram

Off-screen Windows

Window contents saved off-screen

Buffers automatically resized

Sucks huge piles of video memory

Screen updates from off-screen buffers

Visible to all clients

Can be used in many different ways

Manipulate with arbitrary X requests

Programmatic Update

Screen never drawn by applications

Applications draw only off-screen

“Compositing Manager” draws screen

Using off-screen window contents

And whatever other candy it likes

Input currently untransformed

Windows should be drawn “in place”

Compositing Manager

Regular X client

Notices modified windows

Constructs screen image

Window contents

Other eye candy

Uses regular X requests

Only one can (usefully) run for the root

Synchronized Updates

Wish list item

Pend updates until client drawing done

Hook in Window Manager

Synchronize frame/client contents on resize

Questions about Double Buffering

Like to avoid lots of extra image copying

May need new Composite requests

Mouse Input

How it works today

X server maps global X,Y to window X,Y

Window stacking and position defined by X

How it needs to c hange

Window transform defined outside of X

App must capture mouse

Generate window and pos, send through X

New X Extensions

Xfixes

lots of little stuff

Includes Region objects

Damage

Monitor rendering to windows/pixmaps

Send events marking “damaged” windows

Composite

Off-screen window contents

“Split” window hierarchy

Xfixes Extension

Various device-independent changes

SaveSet changes for embedding

Selection monitoring

Cursor changes (fetch image, names)

Region objects

Region objects

2D integer coordinate sets

Already present in X server

Used to hold Damage areas

Damage Extension

Track areas drawn to

Save areas in Regions

Send events to clients

Already present in X server

Software cursors

Shadow frame buffers

Reduces X server code size

Composite Extension

“Split” window tree

Sub-tree drawn off-screen

Automatic update mode

Sub-tree contents automatically copied to parent window

Manual update mode

Sub-tree contents only exist in off-screen buffer

Multiple Applications

Magnify/thumbnail use Automatic update

Just want a copy of the window contents

Don't want to control main presentation

Compositing Manager uses Manual update

Update to parent (screen) under program control

Manual update is unique

Only one client at a time

New ARGB Visual

32-bit ARGB pixels

Implemented with Composite

Automatic update doesn't use alpha

Compositing manager required for translucency

Compositing Windows

XCompositeRedirectSubwindows (dpy, root,

CompositeRedirectManual);

for (;;) {

do {

XnextEvent (dpy, &ev);

switch (ev.type) {

case CreateNotify:add_win (ev.xcreatewindow.window);

...

} else if (ev.type == damage_base + DamageNotify)

damage_win (&ev);

} while (QLength (dpy));

paint_all ();

Xsync (dpy, False);

}

Demo

What can it do today?

Integrating 2D and 3D

Where we are:

Window system is currently 2D

3D applications live in 2D windows

No shared resources

Where I want to go:

X is just another GL app

2D resources visible in 3D world

3D apps can 'paint' with 2D content

Existing Architecture

Geometry

Direct Rendering

2D Drawing

X Server

X Client

GL

GL

GL

Proposed Architecture

Direct Rendering/Geometry

X Server

X Client

GL

GL

GL

GL

Features of a 3D world

Treat 2D windows as “paint”

Looking glass / croquet environments

Shared resource management

No reason to not have 3D acceleration

Eliminate separate 2D drivers

Way easier for vendors to support

Encourage 3D acceleration

Allow ubiquitous 3D applications

X Community Status

Freedesktop.org

Community collaboration site

Started by KDE and Gnome developers

XFree86

Few active developers

Recent license changes driving people away

X.org

Was industry consortium

Trying to become more inclusive

XFree86 License

Includes BSD-like advertising clause

Non DFSG-free

In conflict with GPL

Done without agreement from X devels

* 3. The end-user documentation included with the redistribution,

* if any, must include the following acknowledgment: "This product

* includes software developed by X-Oz Technologies

* (http://www.x-oz.com/)." Alternately, this acknowledgment may

* appear in the software itself, if and wherever such third-party

* acknowledgments normally appear.

Relicensing Consequences

Mandrake, Debian, Red Hat not shipping code with XFree86 1.1 license

Freedesktop.org has RC2 code available

Developers from many distros working together.

Will have public CVS available

X.org Foundation

X.org is restructuring

Encouraging communityparticipation

Interim board to build community-governed organzation

Affiliated with Freedesktop.org

Political Direction

Freedesktop.org umbrella organization

Community governed X.org

Freedesktop releases

X direction led by developers and users

Managing X

Split into separate packages

X protocol libraries

X applications

X server

fonts

Built with autotools

X libraries mostly done

X applications easy

X server “harder”

Freedesktop Platform

“Desktop Platform”

Between the kernel and the desktop

Shared by KDE, Gnome and others

Collection of software components

Released on regular schedule

Components separately releasable

Assured ABI/API compatibility

Wrapup

Three new X extensions

Enables all kinds of new eye candy

Semantics entirely outside of X server

Still need to figure out how input works

X Politics

Moving control back to developers

Integrating Linux and X.org folks

X Development

Moving to modular development

Using standard tools

2004-01-12T16:57:12