Originally posted by jrch2k8
View Post
what make Mir different from X.org? well basically Mir trimmed all the fat of the X11 protocol and try to be a less intrusive middleman allowing you more freedom in the render process, in theory Mir can be atomic and properly threaded too[TODO for now] and uses EGL instead the GLX mammut but still is a global process middleman that you have to request operations even so you have to do lot less roundtrips than you would with X11.[you can confirm this checking their own examples and looking at your process table]
so, why wayland is not a server then? keeping your words wayland is more close to an OpenGL for Framebuffer management than to X.org or Mir. let see it this way, you can do everything wayland does using pure EGL/OpenGL or even GPU ASM, is not a big deal at all and the performance advantage is nasty but if everyone do this their own way basically would be a hell of a mess that will force you to use 1 computer per application, so all christian did was think of an standard library that can send this object directly from the application to the GPU in an standarized fashion so we can all use it. So yes that it is wayland is nothing more that a library of premade objects that you can send to a GPU to do window surface operations directly.
so why wayland need a compositor? it doesn't need one at all and is not part of the spec either
so what is a wayland compositor? put simply a client or application that other applications that use the wayland protocol register objects with, so it can keep a global idea of how the framebuffer is looking in a given period of time and do operations with that information[change a surface position for example or add eye candy], in resume a compositor is a good added value but is not necessary
in which god's case i would not use a compositor? full screen games or any type of full screen application, yeap just create a surface that match the entire display size then render something into it and swap it, 100% GPU dedicated to your APP like magic
in which god's case i would not use a compositor? full screen games or any type of full screen application, yeap just create a surface that match the entire display size then render something into it and swap it, 100% GPU dedicated to your APP like magic
so how wayland/client relate? you app using the wayland protocol create an usable surface, then your app draw something in that surface using any API you like[OpenGL, OpenVG, GPU ASM, Pixman, etc] then your app inform the compositor it have an valid surface at X,Y,Z[in case is not fullscreen] and the compositor simply re render a surface as big as the screen[that include your app and other apps surfaces] and post-process it to give you a final surface composited from all other subsurface
so in resume when your app is linked to libwayland your app not wayland send packages of operation directly to the GPU, use wayland isn't any different than use a let say a jabber protocol library or libtorrent protocol library, in perfect english everything is on you because wayland do absolutely nothing at all beyond provide you with premade operations to start a valid surface in the GPU[ofc if you use tollkits like Qt or Gtk they do the heavy lifting]
so in resume when your app is linked to libwayland your app not wayland send packages of operation directly to the GPU, use wayland isn't any different than use a let say a jabber protocol library or libtorrent protocol library, in perfect english everything is on you because wayland do absolutely nothing at all beyond provide you with premade operations to start a valid surface in the GPU[ofc if you use tollkits like Qt or Gtk they do the heavy lifting]
i hope is more clear[and obviously is very simplified], about been polite is hard sometime when you explain the same thing in 200 different post and ppl still come and say "Lulz wayland don't minimize" or any other barbaric assumption without properly investigate before hand
Anyway, thanks for the brief explanation, it could be useful to make some kind of tutorial, so you don't have to put it into words every time but just link to it.
Comment