 If you can't hear me, ah, I hear the speaker, so it works. Okay, welcome to my talk. My name is Andreas, and I will talk about the device tailored compositor with acute railing compositor framework. It's a very long title, and I will explain it to you in a minute what I want to tell you. Shortly about me, you can find me in several IFC channels. I was the KDE project since about seven years. I did a PhD in something we set up, and today I'm doing completely different things at Class Assistance, a company that's doing these big agriculture machines. It's a really nice green, much nicer than the green of the competitors. And we are hiring, by the way. But this talk is somewhere between my KDE work and my professional work. It's a really, really nice technology that you can use from various devices for displaying stuff from several processes or from several applications. With this talk, my goal is to give a short practical introduction to this framework, tell you how to use it, how you can experiment with it, and make you eager to really use it, since it's extremely cool. I'm not from the acute railing compositor developers. I know them. I work, well, I chat a lot with them, but I'm not completely from them. I'm looking more from the really usage point of view on these frameworks. Okay. It's always very hard to talk about embedded stuff in the car industry and the automotive industry, so I thought about a really nice practical example where I won't get any problems about this funny confidential stuff. That's my kitchen. And I assume I want to have an embedded device somewhere here that helps me in the kitchen. Yeah. What do I want to have on that embedded device? I want to have some applications that help me, for example, for cooking eggs, and for cooking a tea, and maybe it's a current time, and some other applications. I want to have a really nice seamless UI between these applications, so no borders. They should be really nicely aligned. I want to have some touch gestures, like swiping to the left, to the right, and I'm using some nice hardware, like Raspberry Pi or some other embedded hardware that has a GPU, so a little bit of 3D acceleration. That means I can use Qt Quick, which is important later in the talk. Actually, no one else can use it without 3D acceleration. I'm not sure about this framework, but it's always a plus. And well, as I said before, the important point about having several applications there is I have several processes that I somehow have to compose on the screen, so I need a compositor, so usually a rallying compositor. And yes, everything that I explained there is much material to achieve with a simple process, one process application, but well, if you're looking at the modern use case in the automotive industry, or for example in the agriculture business, where we have really, really hard requirements with really heavy applications running on this machine at the same time that you have to compose, so much harder use case actually than in the automotive industry. Well, I want to have several processes there. So I'm going to do a small picture about what I explained to you. That's the size of a Raspberry Pi display. I want to have the applications aligned horizontally. I want to have the swipe gesture left and right. I want to have navigation information, so where I'm currently on my screens. And I want to have some notifications that should be sent from the applications and shown on the compositor, which is actually not that trivial as it sounds in the first hearing. Okay, and the rest of this talk is how can I create such a device with a QValent compositor framework? And actually I want to show a compositor that fits on one slide for achieving this. So a little bit about Valent. I assume that all of you have heard that name at least once. It's a protocol that explains how you communicate between a client and a display server. So between an application with a window or several windows, and the application server, the display server which is a Valent compositor which is responsible for putting the windows somewhere on your screen and also for input handling and so on. So it's really about this communication. And the embedded world, since several years it's the default standard. Nobody is using X anymore, at least I don't know about anyone. There are a lot of added compositors since it's simply a protocol, so you can implement your own compositor. You can find the western, that's the reference compositor. You can find in the desktop environment a lot of different compositors. For example, we have our own one, Quinn and KDE. Gelon has its own, Enlightment has its own. I actually also encounter proprietary compositors somewhere in the field. And Valent gives you a basic protocol. Sometimes you need a little bit more. You want to have your own custom protocol extension. For example, in KDE, we had the extension for snapshots that you can ask for snapshots of all the windows together, how they are currently displayed on the screen. That's a simple protocol extension. How a client communicates with the server and says, I want to have the picture. Can you store it somewhere? Those protocol extensions are well defined in a well-defined standard. Then you have some tooling that creates boilerplate code to your programs and then you can simply use it. There are different available shells, which is well, it's kind of which language to speak to your compositor. The default one is this WL shell that was introduced in Valent 1.0. And we have the XDD shell, which is the actual successor. And we have in the automotive field, especially this IV shell extension, where you have a small, tiny interface, how you can communicate with your compositor and with a goal that it's interchangeable. You can take any compositor that speaks IV shell and you exchange it. However, that is really limited in what you can do there. And in my use cases, it never worked until now. So I looked at this framework, at this cute Valent compositor framework. With this framework, I don't know how many of you used Qt Quick before. I see a few hands. It's a declarative language that, well, it's a declarative language, looks a little bit like Jason, where you say what you want to have. Like, I want to have a rectangle, then you have a rectangle. And you can do the same or do the same with the Qt Valent compositor framework. You can say I want to have a compositor, I want to have an output, I want to put my window somewhere in the output and everything works nicely together. So it's really the power of declarative language for creating such things. And this Qt Valent compositor framework since, I think, two weeks ago that we have this Qt 5H release, now we have this. For these protocol extensions, I talked shortly about last slide, you can also get a little bit more tooling that you get Qt style C++ API, not only the C-style APIs, with this framework, it's automatically generated there. You can, of course, what you want to have are several screens, if you have a device and several monitors, that's nice to have. It implements all these different shells I talked about. And the core is really stable and it's there for several years, at least since Qt 5.0, only the API is new. So it's really stable piece of software framework that you have here. And what they did here is really this really nice Qt quick style API to use it in a really nice way. I shortly talked about this IV shell extension My problem recently until now was that it only fits at least from my point of view for really static settings. Like I have a screen and I have some windows that I want to put statically somewhere on the screen. That's really nicely we're doing with IV but with global guest shell control and other stuff I wanted to have, it didn't work. And for such requirements I would actually have to shell rock directly on my valence server and I didn't want to hack on Western since it's really not my experience what I can use there. So looking a little bit more deeper what we can do with a valence compositor how possible system architecture would look like. We have several applications we have a compositor and possibly you also have intermediate application which I simply called a shell. So you have the apps the apps are talking to the valence compositor by the default valence protocol within Qt it's abstracted by the Qt platform extraction layer you call it if you simply use minus platform valence and it works magically you can also use your custom protocol extension for example for notifications which I will introduce in a few slides how you can add to the small extension for notifications or you could also have a proxy in between this is architecture on the right side where you have a shell that gets all the all information or all these IPC information by some mechanism and then that is the only real valence client that's talking your protocols and talking to the compositor. If you want to have a little bit more stability and encapsulation of the really critical stuff since you never want to have your valence being crashy and you can put a little bit more critical stuff in the shell I will look at this more simple architecture here but the other one is also really simple to achieve and well that's my slide of this talk that's my compositor for what I told you I will talk a little bit about it on this slide and then I will go a little bit deeper in the next slide so like I said it's declarative I did some imports for the basic stuff I need there then I said well I want to have a valence compositor and then I want to have an output like well you want to have something on your screen here below I have the WL shell from that I get the notifications hey there's a new window from application and if I get such a window I put it into a list model since that's nicely to use here since I want to have the windows aligned next to each other and I simply use the default Qt QuickStuff for aligning items, rectangular items somewhere on the screen and I put it in a wrapper called a shell surface item and then Qt did everything for me what I wanted to have here but look a little bit more deeper into it so we always have typically we have as a root this valence compositor it's the actual representation of the compositor in the background everything is created for your valence compositor and usually you should have an output otherwise you don't see anything you should have a shell extension to get information that you have that there are surfaces to be presented the shell extension actually gives you information sent by the vanilla protocol here we have this WL shell and we get the information that the surface created if I add my own custom extension there I can add several extensions there I can also get these informations that I get a signal from an application like your t is ready and we have other shells but for the better use case it's usually enough to simply use this WL shell since we don't have a fully-fledged the learnings nest appear then we have the surface item and the Qvalence quick item which are nice wrappers around the surfaces so the surface is simply in the field where you have some image data and you want to put it on your screen so you get you put it into such a wrapper and then you can use it exactly like a typical Qt Quick item so that's the actually nicest thing about this whole technology you handle windows like there are no windows but simply rectangles with some stuff on it and so you a simple Qt Quick developer can simply use it with all his intuition from what he usually does just consider the surface is a rectangle and I move it and I do some animations on it I enlarge it, I turn it I put a shader on it and all the stuff you can do and that's really nicely since you're working on Compositor like it's a simple process application with a little bit of Qt Quick items that you get from somewhere and that's the real power of it that you can get on a high level really nice effects without being brought with all the technical stuff below and well what do I have here? it's doing the visibility, it's doing the input stuff so I can deactivate the input stuff I can hide it I can show it and well it's really acting like a typical item and of course I need an output that's simply a rectangle area where I can show my results of the Compositor and of course I can have multiple of them I talked a little about protocol extensions for my use case I said well I want to have notifications that by clients since they are like your T is ready your X are ready time to go to bed whatever my applications want to show it globally on the screen and what you see here is a typical XML snippet which describes such a protocol you can use a typical valent tooling the valent scanner to get the binding for it here I'm using the huge tooling since I get the C++ API I can run it and of course all the code and the talk everything is available in GitHub with all history and what I said you are running your tooling over it you get your boilerplate code, your bindings you put it into your applications and it works and so you can have your typical signals and slots where you can connect to where you can send data and everything works and well actually that is what I did for my initial what I have for my kitchen application that's I got a notification your T is ready I have two applications running here and I will try if I get a live demo running here let's start my compositor there is a compositor and my X application let's see there is an application and maybe T application there it is and maybe another egg application then we have a little bit to see here at my navigation bar and I can move it and well I can simply run the applications and well it's easy to achieve something like that and if I would have had time I could have put it on my Raspberry Pi and it works I did several similar things and it's really nicely working also on a lot of embedded devices so I was faster than I thought so we have a little bit of time for question later on I can always start thinking so again what I wanted to show you in this talk is where this new Qt-ValentCompositor framework which allows you to simply create a ValentCompositor tailored for the specific use cases and visuals for your embedded device you don't have to take a stock ValentCompositor that is maybe cumbersome makes problems with Qt event loops which also I have seen with proprietary compositors you can tailor it directly to the user interaction concept your designers give to you since it's actually a designer a Qt quick designer work what you do here the compositor I created here it's literally a one day job to create such a compositor even the first time I worked on it at that time I took two days to get it working that's really nice thing you can use it for fast prototyping of compositors you can also use it well for doing real compositors that you want to use later on and well the power as I already said several times I think the power of this framework is that it gets the right abstraction to get you into a position where you create a compositor or user interface without thinking about the complicated, valent, related stuff far below the surface but you can really look at the UI compositing and the overall interactions you want to have there to get a really cool and nice user interface and the best thing is really to try it out you find my code here you find a lot of example codes and the Qt repositories and yeah there's also a little bit of documentation however the examples are sometimes more helpful currently than the documentation I think okay and there are a few slides three pointers Jorn did a nice talk about the same framework at Qtcon there's the online help and most importantly the ISC channel okay thanks a lot for attention any questions I saw an example in my office not yet but it really works that you have several displays and several outputs there are also example codes for exactly that use case the multiple screen demo there are Qt repositories composite the same way as it was desktop in desktop for example we have just just implement it to your compositor that's your freedom the compositor framework and then you look at what you want to see and the compositor should handle it it's your task to create all these effects in the compositor it only gives you a framework to use it with Qt Quick and then you can implement it okay no more questions thank you