Implementing Vulkan-capable LibreOffice user interface using the Skia library

This work by Collabora Productivity was possible thanks to AMD.

LibreOffice 7.0, just released, includes a new drawing backend based on the Skia library, which allows LibreOffice to use the modern Vulkan API to graphics operations. This Visual Class Library (VCL) backend is the default on the Windows platform, superseding the OpenGL-based backend.

Working on the future of graphics for office productivity

Having multiple VCL backends has its benefit to integrate with different operating systems, but each backend performing its own rendering implementation is far from optimal, since we cannot add new rendering functionality and assume that it will work cross-platform. Many backends across different platforms and toolkits miss optimized paths for various rendering tasks. This adds complexity and makes it hard to ensure that rendering objects happens in an accelerated way everywhere.

Another problem is that multiple backends regularly perform the same type of mapping from VCL’s APIs to what a modern toolkit provides these days. This duplication means not only maintenance cost, but also can lead to having to fix the same bug at multiple places.

Moving away from GDI and OpenGL

The VCL library is responsible for widgets (buttons, controls, etc.) and basic rendering. It does not implement the drawing directly, but it provides an internal API, which is implemented by various backends that implement the actual graphics operations. These backends usually adapt LibreOffice to each platform , for example the ‘win’ backend is used on Windows, the ‘kf5’ and ‘gtk3’ backends are for Unix-like platforms using the KDE Frameworks and the Gtk3 graphics toolkit respectively and there is a ‘headless’ backend used by tests that does not render to the screen.

Each VCL backend uses an underlying graphics API available on the platform to perform the graphics operations. The Cairo library is used by some Unix-like and ‘headless’ backends, the ‘osx’ backend uses the macOS Quartz. On Windows, the ‘win’ backend has several plugable drawing implementations:

  • GDI drawing. This code is relatively old and has several limitations, such as not being double-buffered.
  • OpenGL drawing. This code provides GPU-accelerated drawing. OpenGL is used directly, so all relevant code including OpenGL shaders needed to be implemented in LibreOffice. The OpenGL API is also slowly being phased out in the industry.
  • Skia drawing. The Skia library hides implementation details, and provides several rendering methods, including Vulkan API.

Integrating Skia and Vulkan

The Skia library is not shipped in a binary form, not even by 3rd-party providers such as Linux distributions. It is provided only as source and the usual way to use it in a project is to ship it with that project. LibreOffice includes Skia as a 3rd-party library and fortunately building it using the LibreOffice gbuild system is reasonably simple. An additional complication is that Skia provides a new release roughly every 6 weeks, and generally only the latest release receives any fixes, requiring repeated updates. Since Skia is continually evolving, each update may also require adjustments (although so far it seems they are generally small).

Collabora’s developers taking the first hurdles

The Skia API is generally well documented, but it appears to be mostly aimed at developers already working on a project using Skia, such as Chrome. Important classes have their API well described, but it can be difficult to find tutorials for them and some classes are harder to understand at the beginning (for example, SkPixmap, SkBitmap, SkImage and SkSurface are all classes representing a drawable, but it was unclear at the beginning what the suitable use cases would be for each for them).

Similarly, it is not obvious how to use Skia in a new project. There does not seem to be any actual developer introduction to Skia in the documentation, nor does thereseem to be any documentation on how to setup a new or standalone project using Skia. There is a Hello-World example in the examples/ directory that is based on platform integration code that is not part of the Skia library itself but is inside a sk_app/ directory in the tools/ directory. That code was usable for LibreOffice, but required patching to cover LibreOffice needs (for example, the code created a new graphics context for each toplevel window, and Skia requires proper graphic context to be used in drawing operations, but LibreOffice code sometimes does not know which toplevel window will use the result of a drawing).

LibreOffice is a fairly old codebase, and still uses relatively old concepts such as paletted bitmaps, low-resolution bitmaps (such as 4bpp) or drawing that uses the XOR operation on pixels. Skia, being a relatively new library, has features that assume modern concepts are used (for example, RGB bitmaps are required to be 32bpp with unused alpha channel, 24bpp RGB bitmaps are not supported).

 

AMD Skia / Vulkan integrated in a alpha-release of LibreOffice 7.0

 

Once the initial learning period is over, Skia is consistent in its API and reasonable flexible to use allowing progress to be relatively fast. Code using Skia is very readable, and using Skia makes future maintainance tasks easier to perform. Even some old concepts, such as LibreOffice using a separate bitmap for alpha channel, sometimes interpreted as 8bpp and sometimes as alpha, later blended with data bitmap to get the actual result, could be mostly implemented using Skia API, making them GPU-accelerated.

Nice performance and even room for improving

While there were some concerns about how performance would be affected by moving to Skia compared to OpenGL driver and and hardware implementations that have been heavily optimized over the past several decades, it turns out that performance within LibreOffice is at least equivalent to the OpenGL version and synthetic benchmarks show that there is room for improvement.

Benefits for LibreOffice-technology

While somewhat complicated at the beginning, using Skia in LibreOffice has been in general a rather pleasant experience. In the future LibreOffice’s use of Skia could be extended to other platforms, reducing the number of platform rendering APIs used, eliminating duplicated code, reducing bug count and generally improving quality.

For comparison, LibreOffice OpenGL drawing code is roughly 12k lines of code, while Skia drawing code is only 4k.

Apart from the immediate benefits, moving to Skia and Vulkan on Windows paves the way for a single, powerful, hardware-accelerated rendering API cross-platform.

Moving to Skia on Windows required about 7 person-months ol, which lets us use Vulkan acceleration without large implementation costs. It will be interesting to see how much time is saved in the next few years from the reduced maintenance cost. The resulting work is mature enough that there is no real negative change in performance, and we have not started heavily optimizing yet.

Read More

Experience Collabora Online on your Intel NUC with Nextcloud and Ubuntu


Keeping full control over your personal data and documents, is more and more important. Sharing by email or via the services of big tech companies is losing its shine, for obvious reasons. To help our users we introduce a new fresh Nextcloud Ubuntu Appliance for the Intel NUC, that comes with Collabora Online.

Simply take an Intel NUC server, install the Ubuntu Appliance and take back control over storing and sharing your personal data and files with Nextcloud. Next, of course, you want to read and edit your documents, now stored on your own server, wherever you are. Naturally you will be able to allow others to review and comment on text, presentations, charts and more, perhaps during a video call or chat. All this under your own control!

The new Ubuntu Appliance with Collabora Online and Nextcloud offers you just that – and more too. Do read these articles about the Ubuntu Appliance and the Nextcloud features. Now, let’s have a look at Collabora Online and some of the great features that you will benefit from.

Easy built-in installation

First a few words about getting started. For the Intel NUC Appliance, we offer you the Nextcloud integrated Collabora Online built-in server.

This makes getting started really easy. This installation is perfect for personal use or use with small teams. If you are looking for a larger deployment, contact us for details about a full, scalable installation:

Screenshot of a Nextcloud installation: Install and select CODE-Built-in-server
Install and select CODE-Built-in-server

Keep cool lists, master images, handle comments

Collabora Online is built using LibreOffice technology. Its feature richness and document support is, in principle, similar to what that desktop suite offers. And while Collabora Online already gives you great capabilities and document display, more features are being added all the time! So a good tip: keep an eye out for new releases, and enjoy those using the easy built-in extension update.

Here we show you a spreadsheet file with some lists, and some conditional formatting options you have.

Pick any formatting that suits you

Working with images in Collabora Online, knows few limitations. Position, on the page, resize, rotate, proper wrapping and more. It all works nicely, and you can visualize your documents as you edit.

Tremendous options to work with images

One of the main advantages of online documents is sharing and collaborating. The next picture shows you tracking changes and handling of comments in a text file.

Multiple users editing and commenting

Are your documents really shared?

Do you lose control over your file when it is shown on someone else’s screen to review or edit? No, not really. You may be surprised, but your files will in fact remain on your NUC. As a user you think you are editing cells or formulas or typing text in a document in your browser. But we’re fooling you: you are reading and typing back in that single document on the server. How can this be done? There is some ‘magic’ in Collabora Online that renders your document into a set of small images and those are shown on the screen. Editing the document is done in layers of images displayed, while there is just one single version of your document that never has to leave your NUC.

All about Ubuntu for the NUC

The Ubuntu Appliance is new and really cool to make your Intel NUC a nice home server with Nextcloud and Collabora Online. The Ubuntu blog tells you much more and explains how to get started. Give it a try!
How to use the Nextcloud Ubuntu Appliance with Collabora Online on an Intel NUC

Nextcloud

Many users of Collabora products know Nextcloud as a great platform for controlling, syncing and sharing their files, communicating with others using Talk, handling calendars and email and much more. Check the Nextcloud introduction and video on the Ubuntu Appliance.

Getting involved

Collabora Online code is all open source, giving interested readers the opportunity to join or just take a look under the hood.

Read More

Collabora Online and mobile now with full CJK support

Starting from today’s release more users around the globe will benefit from Collabora Office on iOS and Android! With the just released version 4.2.6 there is full support of CJK fonts and also the user interface has various related improvements.
Fonts available on your mobile device for Chinese, Japanese, Korean, Hindi, Arabic and other scripts, will now be used by the app. This gives many new users the native usability they need, the privacy and control over their data with a quality product they expect from a Collabora.

The latest Collabora Online has some related improvements too.

 

Which scripts are now supported

The updated Collabora Office mobile apps do now support a wide range of scripts and fonts natively available on your phone. Namely, those are:

  • Chinese (Mandarin, simplified)
  • Chinese (Mandarin, traditional)
  • Hindi
  • Japanese
  • Korean
  • Thai
  • Vietnamese
Example of Writer document with different Asian fonts

Improvement in fontconfig

The support for Chinese, Japanese, Korean, Arabic, and other previously unsupported scripts, could be added thanks to a performance fix in fontconfig. This allows resulted in a much improved loading time of the app. Thanks to Behdad Esfahbod (branch faster), fontconfig authors and contributors, and Michael Weghorn (for updating fontconfig) for their work on this!

All info

Do you want to learn more about the mobile office apps by Collabora Productivity? Find all the relevant info summarized on the product page. A good reference for those interested in the detailed development progress of Collabora Office for Android & iOS are the latest release notes. If you want to find out about the history of the apps and the people and entities involved, we suggest you take a look at our detailed chronological credits article.

For information about Collabora Online, see the release notes and the initial announcement of version 4.2.

Get Collabora Online

Collabora Online is the business ready supported product for professional use. Collabora products are built on LibreOffice technology. Collabora is the creator of LibreOffice online.

Get Collabora Office

Collabora Office for Android and iOS enables editing of documents on the go and is developed with your privacy in mind. Download it for free from the App Store of from Google Play.

Read More

Send Encrypted PDF files with Mail Merge

From now on the powerful Mail Merge feature will be even more useful: you can send encrypted PDF files directly from Collabora Office Writer!

A handy feature of Collabora Office Writer since long, is doing a mail merge that directly sends out PDF files. From now on you can make the PDF files encrypted, adding additional privacy option to your work. The feature will be available in Collabora Office 6.2-21 and 6.4, and has of course been pushed to the LibreOffice master branch as well. Thanks to Collabora for sponsoring this work and kudos for Gülşah Köse for doing the work. In this article we’ll show you how to set this up.

Mail merge preparations

Of course, you need to have done the usual preparations for mail merge. We’ll briefly show a few essential steps.

Set up the mail server

This allows you to directly mail the merged documents from Collabora Office.

  • Open (a file in) Writer.
  • Select Tools→Options → Collabora Office Writer → Mail Merge Email

And fill the fields like following (with your own information)

Filling in the user information for Mail Merge
  • Click the Server Authentication button and fill with your information and click OK.

If the first option is insufficient, then of course also fill in the other information.

Adding additional information for Mail Merge
  • From the Options dialog click the Test Settings button to see if your information is OK.

If so, you will see the following dialog. If not, check the information again.

Success! This dialog confirms the correct account settings
  • Click OK from the Options dialog. Then mail server should be set now.

Prepare the database / data source

Collabora Office can link to various data sources. In this case, of course an email address and a password to encrypt the PDF file must be provided by the database.

The simple table below, has fields / columns for emails and passwords.

Address data for Mail Merge can be compiled in a spreadsheet

You have to make sure that this data source is used.

  • Chose Edit→ Exchange Database…
  • Click View→Data Source to use that database in Collabora Office

Next steps are of course creating a template document with fields and content. It is not necessary that the email and password fields are in the template – you must select these later on.

Do the mail merge

  • To send the document use Tools→Mail Merge Wizard or click the icon on toolbar.

  • In the Wizard:
    1. Select Use current document and click Next
    2. Select E-mail message and click Next
    3. Click “Select the address list”. Select your sheet from the menu and click OK.
    4. Click “Finish”.

We are ready for sending documents.

  • Click the “Send Documents” icon from the toolbar
The Mail Merge icons can be activated via View > Toolbars > Mail Merge

Chose to save and send with password

As a last step, you will see the following dialog.

  • Chose “Send as Adobe PDF”
  • Then the password option will be available. Select it.
The final settings before your encrypted PDF will be sent

The password for each PDF file will be taken from the database of recipients, thus allowing the use of individual passwords.

  • Click the “Send Documents” button and wait for the process to finish.

That’s all. We hope you like this. 🙂

Test Collabora Office

If you want to learn more about our long term supported Collabora Office 6.2 (supported until December 2022 at least) and its possibilities and advantages for your organization, get info and a demo here!

[button style=”btn-default btn-lg” type=”link” target=”false” title=”Test Collabora Office” link=”https://www.collaboraoffice.com/solutions/collabora-office/” linkrel=””]

 

Read More

Collabora Office ships for Chromebooks

London, July 24 2020 – Collabora Productivity, the driving force behind LibreOffice in the cloud, announces the immediate availability of Collabora Office for Chromebooks, its first native productivity tool for Chrome OS.

User control of documents on Chrome OS

Chromebooks are popular, and their use continues to grow rapidly. However, until now they have lacked a rich office productivity tool that users could combine with their choice of storage, to regain control over their files and privacy.

Today, we make a new release of Collabora Office, the LibreOffice-technology based suite for professional, mobile, and online use, available ready to run on Chromebooks!

Privacy Shield

Chromebooks are not the only relevant positive trend. The desire to keep control over data and document storage is another. With digital sovereignty becoming a hot topic for regional and national administrations and by the EU, who have launched a special program in this area.

The recent EU court ruling that declares that the US Privacy Shield conflicts with the GDPR, has further raised people’s awareness of digital freedom and sovereignty.

Education

Since Chromebooks are attractive and affordable PCs, they are present everywhere these days and with today’s release of Collabora Office, users control over their files and privacy is back. Because of the rich features it is not needed to use Microsoft or Google for professional use or for study. These benefits, make education an area where both Collabora Online and Chromebooks are widely used.

Collabora is thrilled to provide even more convenient products for schools and universities. […] We are glad to serve our many partners in the education market, and together to protect the privacy of students.”
– Michael Meeks, General Manager at Collabora Productivity

Collabora Products are popular because they allow organizations to have applications and storage on-site and be GDPR compliant, still working with excellent collaboration and interoperability tools for office productivity.

Rich editing, work with images, comment and more in windows mode

Working with partners

While Collabora has developed almost the entirety of this mobile technology and UX, we are profoundly grateful for support from our partners. For this release, we are indebted to AMD for helping to bring the existing Android app to their next generation of extraordinary Chromebooks.

Really richly featured

Chromebook’s popularity clearly shows that businesses and education increasingly opt for the reliable and straightforward Google platform. But do users get a great feature richness to work on their files?
With the new Collabora Office, users get an app that not only supports all their documents (from Microsoft formats DOCX, XLSX, PPTX, DOC, XLS, PPT to the open standards ODF) and offers viewing and working on text and contents, but also provides rich editing with a handsome interface for e.g., images, page formatting, charts, and indices.


Setting the right Bullets and Numbering style

Working with Columns in text files

Save to your private cloud only

Private friendly cloud storage solutions, such as Nextcloud and ownCloud, provide plugins for Chrome OS that allow users to write directly to their private cloud, without having to save to the device first, after which the file would be saved directly on the Google or Microsoft server storage as well..

Collabora Office matches perfectly with the wish to save directly to your own cloud. It allows users to use the mentioned plugins with ease and not be forced to save their office documents to someone else’s server anymore.

Arriving ahead of native platform curve

With the release of Collabora Office for mobile devices version 4.2.5, Chrome OS is fully supported by Collabora Office. Our products now run on iOS, Windows, Android, Chromebook, and Linux and of course, in any modern browser.

Collabora Office brings its first native productivity tool for Chrome OS, ahead of Google’s recently announced work to bring Microsoft’s Office to Chromebooks. The currently available mobile Microsoft Office apps in contrast provides just a limited set of features.

Remember that, to be able to enjoy the Collabora Online on a Chromebook, a recent version of Chrome OS, that includes the Android Runtime (for Google Play), is required.

On the technical side, the new Collabora Office release supports two new platforms: x86 and AMD64. X86 was needed to run native on the Chromebooks, and with AMD64 we matched the need for a a 64-bit version, as required by Google Play.

Users of Collabora Office on Android may remember that the first Android builds were able to start up on Chromebooks. However that was by coincidence. These worked under a slower emulation, and were missing lots of required polishing and performance.

Collabora Office for Chrome OS can be installed from Google Play

 


More information

Read More