Qt 5.12 Upgrade in webOS OSE

November 07, 2019

Author: Jungyong Ko

In September 2019, LG Electronics announced a strategic partnership with The Qt Company (Qt) that the two organizations will collaborate on multiple layers, including collaboration on platform development as well as co-marketing activities to build a thriving webOS OSE community and move beyond to a new vertical. As the first step to such an ambitious plan, webOS OSE is upgrading its Qt components to the latest Long Term Support (LTS) version, Qt 5.12 LTS.

Although the announcement took place a few months ago, LG has been a strong advocate of Qt for quite a while. To give you an example, here is the comment made by Anupam Kaul, who is a senior manager at LG Silicon Valley Lab.

“LG is not only using Qt for TVs but various other products and in various capacities. Not just on the UI level, but also in control software and many other areas. Qt is an integral part of LG, and we hope to continue that relationship.”

He also commented that,

“When we evaluated different technologies, we looked at Wayland, and we looked at Qt Wayland. What was amazing was that there was already a body of work done by the Qt community. I was able to tap into that community - not just the code, but the resources and partnerships and that really helped us - had that open source community not been there, it would have taken us much longer time to deliver.”

As you can see from his comments, Qt has provided benefits in many aspects of LG’s product development, and this upgrade is an indication that the partnership will continue to exist for at least some time in the future.

Note
For more about the interview by Anupam and how Qt helps LG design its innovative products, visit the Qt website.

Let us look at the role of Qt in webOS OSE.

Introduction to Qt inside webOS OSE

Qt is a cross-platform framework. The ability to work across multiple types of the platforms is beneficial to webOS OSE because there is no need to duplicate efforts for applications and the platform-specific components as long as Qt’s submodules are well incorporated. The component that benefited from Qt the most is the Luna Surface Manager (LSM), a graphics manager of webOS OSE.

It takes advantage of the Qt scene graph, which sits at the core of graphics composition as well as QML, which enables easy GUI modeling. LSM is implemented using Qt, and the system UIs such as home launcher and notifications are implemented using QML. Moreover, webOS OSE uses QtWayland, which provides a way to run Qt apps as Wayland clients and allows developers to write their own Wayland compositors. With all these incorporated into webOS OSE, it can focus on differentiation and value addition by merely leveraging essential functionalities of graphics compositor.

webOS OSE 2.0 graphics example

Note
LSM is a service module responsible for composition of Wayland surfaces, rendering of webOS System UI, and input event handling. In all modern graphics systems, surface management and input handling relate deeply to each other. Likewise, when the webOS system receives input from the user, LSM arbitrates the input among multiple clients to make the relevant graphics element respond to the event accordingly. One of the notable characteristics of LSM is that it is just another Qt application that consists of a single user process.

LSM architecture diagram

Highlights of Qt 5.12 Upgrade

Now then, what does Qt 5.12 LTS include? While you can find the extensive list of updates in Qt 5.12 LTS Release Notes, the highlight that is relevant to webOS can be the significant improvement to the JavaScript engine supporting QML. It now fully supports ECMAScript 7, and this allows modern JavaScript and simplifies the integration of Javascript libraries. It also supports ECMAScript modules, and you can load the modules from both C++ as well as QML/JS. Overall, it now uses memory more efficiently and is faster.

The partnership between Qt and LG will undoubtedly continue, and currently, the plan is to align with Qt LTS version and to provide continuous maintenance between the updates.