Port compositor to GLES2
[profile/ivi/wayland.git] / TODO
1  - sync-to-vblank
2
3  - how does clients move their surfaces? set a full tri-mesh every
4    time? probably just go back to x and y position, let the compositor
5    do the fancy stuff.  How does the server apply transformations to a
6    surface behind the clients back? (wobbly, minimize, zoom) Maybe
7    wobble is client side?
8
9  - switch scanout when top surface is full screen
10
11     - what about cursors then?  maybe use hw cursors if the cursor
12       satisfies hw limitations (64x64, only one cursor), switch to
13       composited cursors if not.
14
15  - multihead, screen geometry and crtc layout protocol, hotplug
16
17  - input device discovery, hotplug
18
19     - Advertise axes as part of the discovery, use something like
20       "org.wayland.input.x" to identify the axes.
21
22     - keyboard state, layout events at connect time and when it
23       changes
24
25     - relative events
26
27     - input handling - keyboard focus, multiple input devices,
28       multiple pointers, multi touch.
29
30  - wayland-system-compositor
31
32     - device kit/libudev/console kit integration to discover seats,
33       that is, groups of input devices and outputs that provide a
34       means for one user to interact with the system.  That is,
35       typically a mouse, keyboard and a screen.  The input devices
36       will just be evdev devices, the outputs will be a drm device
37       filename and the specific outputs accessible throught that drm
38       device.
39
40  - send drm device in connection info, probably just udev path.
41
42  - cairo-drm; wayland needs cairo-drm one way or another:
43
44     - chris wilson (ickle) is doing cairo-drm for i915 now, basically
45       the pixman-drm idean, but inside cairo instead.
46
47     - pixman-drm; move the ddx driver batchbuffer logic into libdrm
48       and write native, direct rendering acceleration code in
49       pixman-drm.  is a clean approach in that we avoid the mess of
50       the global GL context leaking through to applications, and we
51       can bootstrap this project by pulling in the EXA hooks from the
52       DDX drivers.
53
54     - use open gl behind the scenes a la glitz.
55
56     - should be possible to provide a realistic api and then stub out
57       the implementation with pwrite and pread so gtk+ port can proceed.
58
59  - XKB like client side library for translating keyboard events to
60    more useful keycodes and modifiers etc.  Will probably be shared
61    between toolkits as a low-level library.
62
63  - port gtk+
64
65     - eek, so much X legacy stuff there...
66
67     - draw window decorations in gtkwindow.c
68
69     - start from alexl's client-side-windows branch
70
71     - Details about pointer grabs. wayland doesn't have active grabs,
72       menus will behave subtly different.  Under X, clicking a menu
73       open grabs the pointer and clicking outside the window pops down
74       the menu and swallows the click.  without active grabs we can't
75       swallow the click.  I'm sure there much more...
76
77  - Port Qt?  There's already talk about this on the list.
78
79  - X on Wayland
80
81     - move most of the code from xf86-video-intel into a Xorg wayland
82       module.
83
84     - don't ask KMS for available output and modes, use the info from
85       the wayland server.  then stop mooching off of drmmode.c.
86
87     - map multiple wayland input devices to MPX in Xorg.
88
89     - rootless; avoid allocating and setting the front buffer, draw
90       window decorations in the X server (!), how to map input?
91
92  - gnome-shell as a wayland session compositor
93
94     - runs as a client of the wayland session compositor, uses
95       clutter+egl on wayland
96
97     - talks to an Xorg server as the compositing and window manager
98       for that server and renders the output to a wayland surface.
99       the Xorg server should be modified to take input from the system
100       compositor through gnome-shell, but not allocate a front buffer.
101
102     - make gnome-shell itself a nested wayland server and allow native
103       wayland clients to connect and can native wayland windows with
104       the windows from the X server.
105
106  - qemu as a wayland client; session surface as X case
107
108     - qemu has too simple acceleration, so a Wayland backend like the
109       SDL/VNC ones it has now is trivial.
110
111     - paravirt: forward wayland screen info as mmio, expose gem ioctls as mmio
112
113     - mapping vmem is tricky, should try to only use ioctl (pwrite+pread)
114
115     - not useful for Windows without a windows paravirt driver.
116
117     - two approaches: 1) do a toplevel qemu window, or 2) expose a
118       wayland server in the guest that forwards to the host wayland
119       server, ie a "remote" compositor, but with the gem buffers
120       shared.  could do a wl_connection directly on mmio memory, with
121       head and tail pointers.  use an alloc_head register to indicate
122       desired data to write, if it overwrites tail, block guest.  just
123       a socket would be easier.
124
125  - moblin as a wayland compositor
126
127     - clutter as a wayland compositors
128
129     - argh, mutter
130
131  - make libwayland-client less ghetto
132
133  - sparse based idl compiler
134
135     - crack?
136
137     - xml based description instead?
138
139  - actually make batch/commit batch up commands
140
141  - protocol for setting the cursor image
142
143     - should we have a mechanism to attach surface to cursor for
144       guaranteed non-laggy drag?
145
146     - drawing cursors, moving them, cursor themes, attaching surfaces
147       to cursors.  How do you change cursors when you mouse over a
148       text field if you don't have subwindows?  This is what we do: a
149       client can set a cursor for a surface and wayland will set that
150       on enter and revert to default on leave
151
152  - server should be able to discard surfaces, and send a re-render
153    event to clients to get them to render and provide the surface
154    again.  for wayland system compositor vt switcing, for example, to
155    be able to throw away the surfaces in the session we're switching
156    away from.  for minimized windows that we don't want live thumb
157    nails for. etc.
158
159  - auth; We need to generate a random socket name and advertise that
160    on dbus along with a connection cookie.  Something like a method
161    that returns the socket name and a connection cookie.  The
162    connection cookie is just another random string that the client
163    must pass to the wayland server to become authenticated.  The
164    Wayland server generates the cookie on demand when the dbus method
165    is called and expires it after 5s or so.
166
167     - or just pass the fd over dbus
168
169  - drm bo access control, authentication, flink_to
170
171  - enter/leave events from the input devices
172
173  - gain, lose keyboard focus events; this event carries information
174    about which keys are currently held down as a surface gains focus
175    so the client can deduce modifier state.
176
177  - Range protocol may not be sufficient... if a server cycles through
178    2^32 object IDs we don't have a way to handle wrapping.  And since
179    we hand out a range of 256 IDs to each new clients, we're just
180    talking about 2^24 clients.  That's 31 years with a new client
181    every minute...  Maybe just use bigger ranges, then it's feasible
182    to track and garbage collect them when a client dies.
183
184  - multi gpu, needs queue and seqno to wait on in requests
185
186  - opaque region, window rect
187
188  - save and restore state on crash, clients reconnect, re-render
189    buffers
190
191  - how do apps share the glyph cache?  what is the glyph cache, how
192    does it work?  pixbuf cache?
193
194  - synaptics, 3-button emulation, scim
195
196  - what to do when protocol out buffer fills up?  Just block on write
197    would work I guess.  Clients are supposed to throttle using the
198    bread crumb events, so we shouldn't get into this situation.
199
200  - when a surface is the size of the screen and on top, we can set the
201    scanout buffer to that surface directly.  Like compiz unredirect
202    top-level window feature.  Except it won't have any protocol state
203    side-effects and the client that owns the surface won't know.  We
204    lose control of updates.  Should work well for X server root window
205    under wayland.