What's wrong with wayland?

Sam Spilsbury smspillaz at gmail.com
Sat Feb 19 02:26:13 PST 2011

On Sat, Feb 19, 2011 at 1:59 PM, microcai <microcai at fedoraproject.org> wrote:
> I used to think wayland is better.
> But now, I don't.
> What is Wayland ?
> Let me tell you:
> Final Wayland = X11 that rip out everything but GLX.
> Current wayland still missing Input framework like XIM. And batch  of
> other stuffs. Adding it will led wayland to  another X11.

I think these calls about how wayland is "dommed to reinvent X11" are
a bit unjustified. I think a more accurate thing to say is that
"wayland is going to become another display server which operates in
similar ways to other display servers out there, like X11". But
whatever happens, wayland is *not* going to "become" X11.

X11 is designed around a networked display and window server protocol.
It was core to the design of X11 that it managed the display hardware
server-side, doing things such as mode-setting, indirect acceleration,
and drawing primitives. It also managed (to some extent) what went
into graphics memory. But the core part of X11 is that it only managed
windows and pixmaps which were owned by clients running in different
processes over a network protocol. The window manager and compositors
are implemented externally, using that information from the server to
blit the graphics on to the screen and actually change the size and
position of the windows.

The key difference with wayland is two-fold. First of all, it
recognizes that server-side rendering is a bit useless and therefore
having a network protocol so that you can do server-side rendering is
also unnecessary overhead. Second of all, it integrates the window
manager, compositing manager and window server into one process
(through libwayland-compositor). This means that there is tighter
integration between all three and that the window manager has greater
control over what is going on server-side.

> Wayland forces every app uses OpenGL as drawing facility. Then they
> said, hey , mine are faster than you!
> Of-course wayland is faster! if X11 app also switch to OpenGL
> completely ,  X11 is also faster!

Wayland requires that you render to a graphics buffer on the hardware
(eg direct to memory that is accessible to the video card). Right now,
these buffers are implemented by GEM or TTM. It just so happens that
OpenGL ES provides us a quick, easy and portable way to render
directly to these buffers using drawing commands directly on the video
card. It is also likely that any other drawing frameworks are going to
be implemented on top of OpenGL ES since that is the most portable way
of implementing a draw-to-buffer method.

What will make wayland's drawing implementation a lot faster than what
we have with DRI2/X11 right now is that we don't need to worry about
the server-side overhead of making pixmaps on the display server
reference some buffer object in graphics memory - we can address these
buffers directly. In addition, there are no more round-trips to the
server to make anything in our GL implementation work, since the
OpenGL ES is not windowing system dependent.

> needless to say , wayland has only one working driver, but X11 has a lot!

All the driver needs to do is have DRM/DRI support, GLES support and
pageflip support. And it just so happens that the open drivers either
support this, or are gaining support for it very quickly.

> =================
> That's what I'm now thinking about wayland, maybe I am wrong. And I hope
> I am wrong.
> Thanks for any comments.
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Sam Spilsbury

More information about the wayland-devel mailing list