 Okay, I'm Tomar Reingehl. I'm from Collabora Productivity, and I've been talking about what I did last couple of months, years, In o liberofizji 5, da je to, da nekaj dobro v liberofizji. Prv sem tukaj tukaj pravam o openGL. Tako, da smo tukali, da smo tukali na vse pletforme, In vsi kašlji bih nekaj, da se pričoče, ... nekaj, da počkaj smo tudi počkaj, da počkaj smo iz dužnega glasba, ... da b�e se nekaj, da so zašličo, in nekaj ne vse bo nekaj odbáčati, ... in tudi nekaj, da so počkaj, da smo priče, Why we use OpenGL? Because almost every laptop, every computer has a GPU which is very powerful, so we should use them as much as possible for tasks that are meant to. We want to render everything in OpenGL. This means also all the controls on the UI and of course the canvas and the slides and things like that. Because it's cross-platform in theory. Of course there are problems. We encountered many of them. For example, different GPU drivers have behaved differently and have bots. We had to eventually fix or just blacklist the drivers, so we couldn't use OpenGL on these drivers. This was really a problem. The next problem is that the current API of how in LibreOffice we draw things is not really good for, not really designed for how GPU is using drawing and not optimized for drawing. In general, you can't draw things, but you cannot draw them fast enough, because you have to do a lot of switches and texture uploads that are unnecessarily, just because the API is not really meant, not really optimized for drawing on the GPU. Another thing is also 2D, it's not 3D. In 2D you have things like anti-aliased lines. Most of the things anti-aliased, sometimes, but sometimes also not. For example, OpenGL allows you to do anti-aliasing, but if you choose this, then you have to anti-aliase everything. This is a performance problem, the second is you don't want to do it always. Primitives like Bezier curves, the curves you have to do on the CPU. Ideally, we would do this on the GPU to accelerate this. Problems like complex polygon rendering and tessellation of polygons. If the polygon is not convex, it doesn't have holes or anything, it's not a problem to render it, because when you have more complex polygons, then the problems start, and you have to do it differently on the GPU. Really complex problem is the font rendering itself. We are the office suits, so font rendering is extremely important. We have to hinting and a lot of things that are really important. On the GPU, something like this is really hard, it's not really existence. There is a library, like a Glyphy from Google. We try to use it, but it's still far away to have some good results with it. Or fast, at the same time. What we usually do for fonts, for text rendering, is you render text into texture atlases and then draw from the texture to the document itself. Which is okay, but performance, but there are problems with things like kernel ink and stuff. Then you have really big problems like this. I know, we've been doing this for years, and we have zero kernel problems. We just use half bars to do all the layout, do all the kernel, and we just choose textures from the atlas where the glyphs already rendered the font glyphs, and they current correctly. It's not hard, but the CPU side has to do it. Which we, oh sorry, Enlightenment EFL, we've been using the GPU for rendering for many, many, many years. You can even do bezier curves on the GPU in a fragment shader, use a quadratic, and if you do tessellation on the CPU and just turn it into one triangle spanning one set, it's not quadratic, but it is patented. Nvidia, I think, has patents on that. Go check it out as a paper on it. Yeah, yeah, I know. I think it's Microsoft's. Oh, no, sorry, it was Microsoft's. But Nvidia implemented it. So, generally, you could also do in the geometry shader. Same thing, I think. So, what we're doing, we've actually also been adding vector stuff now, and what we do is we have one thing where we generate spans on the CPU, and we just stuff spans into the GPU, like in a texture, and we have a fragment shader to decode the spans on the fly. Yeah, we will... Let's talk later. But if all of these are actually solvable... Yeah, these are solvable. Yes, these are solvable things, but you have to... It's a pain, yeah, because you cannot just... This is more your question, but the current structure is not optimized. To be done this way, you're having to go through a restructure code, right? Yeah, also as... But currently we don't... First is that we just want it to work exactly correctly, then we'll try to optimize and go from there. Yeah, and the last problem is the transfer between CPU and GPU. So we have to be very careful any transfer costs, time and memory, so we have to optimize it to the minimum. Next thing I want to talk about is a LibreOffice kit. So what actually this is, this is an interface for LibreOffice, a simple C and API, so that you can interface with LibreOffice. There is a stable API that is just generally used for document conversion currently. But we also have an unstable API that is just for... which also supports the rendering of text and you know commands. This is like you know commands and actions like bold and italic. You can send this command and the current cursor will be changed to bold. And of course the callbacks. So if you go with cursor, anything where it's bold, then you have to say back to the callback that some stage has changed. So that now the current text under is in bold. So this is then used by LibreOffice for Android. I was last year talking here about on this conference about LibreOffice for Android how we edit editing. This is just a little bit repeat. So we use LibreOffice kits and why JNI, Java native interface. And we then took Firefox for Android and just reshape it so that we can use it for document rendering. Gestures and tight rendering is used by Firefox for Android. So what we have implemented is then document viewing. This was for a company, Smooth funded us to do these initial steps. And then we built on top of that and added also basic editing. So basic editing of text and you can change pictures or rotates and like this to the GUI. And this was funded by in the document foundation. Later we also added some toolbar in the application. So you can change very basic editing functions but I like which font and stuff like this. Generally this current state is somewhere there it's still not good. We had big problems with size of the APK because we were limited to I mean Google has limited to 50 megabytes and this was now extended to 100 so this was a really big relief for us. So we can just add more and more features we don't have to take them away actually. So the next thing we also then did based on this is a LibreOffice Online. LibreOffice Online this is just a cloud version of LibreOffice that has similar principles like in LibreOffice for Android we generate the document the ties of the document via LibreOffice kit and send them to the client. In this case the client has a yellow leaflet. I'll talk a little bit later. And for the communication it uses a web socket so the server special server communicates with the client via web socket because we need asynchronous messages sending of messages and this is not possible we just arrest api or normal arrest api and the communication might be full duplex also. So on the client we built the client with leaflet.js library this is a library that is generally used for in OpenStreetMap for displaying the maps so we just retrofit it and changed it so that instead of maps it just shows the document the ties are generated on the server and cached and then they are transformed or compressed to a PNG files and then sent to the client where they are then shown like the document. So then we created the SVG overlay for the selections so if you select things an SVG overlay will show the selections and also cursors and some handles and then also here we added a toolbar where you can manipulate the state of the document and of course if there is state change because of the web socket api you can get this back and change on the toolbar the state so I have a question is all of this only for documents or does it also cover power points and what the presentations and yes of course so you can interface with the document managing system we built this for a company called Icewarp that funded the actually the whole everything and because there are a company for document management we interface with them we also added integration with oncloud and now we are working on collaborative editing so it is possible to do collaborative editing soon. We have created this code this is collaborative online development environment collaborative online is our enterprise edition of the LibreOffice online and for easier testing we created a virtual machine which has collaborative online integrated with oncloud so we can just fire up and test it out so so this is oncloud and we already have this some basic documents example documents you can just test it out for example this so this now starts up the collaborative online and you can just edit the document I hope there is no it is a little bit buggy so it will work when you change the document you can also see how the tiles are re-rendered sometimes because when you change everything you have to change all the tiles that are beyond this so this works and you can zoom it here when you zoom it the document changes and the tiles have to be refetched and they are also cached so it works fairly quickly the second time in the first time you can see a little bit redrawing second times you cannot almost not see anything you can change the fonts selections we have these handles these are just copied from LibreOffice or Android where you can also change it the image no problem and now this is now the toolbar changes to center horizontally add bullets yes real time like collaborative editing yes this still works we have some prototypes but not yet some working currently this is not working here but it will be working we are working on this so this is mainly what I wanted to show you today