This article helps you fully understand the Fangtian window engine

In May 2023, openEuler officially established FangTian SIG. FangTian SIG focuses on the FangTian windowing engine, including display services, window management, graphics drawing, compositing, displaying, and other modules. At the same time, it launches a new FT display protocol to explore and solve the problem of poor Linux desktop environment experience .

After more than two months of development and debugging, FangTian SIG has successfully run the Demo application on the device. This article will introduce the latest progress of FangTian SIG, and give a comprehensive interpretation of the FangTian window engine.

Progress of FangTian SIG

The Fangtian window engine (hereinafter referred to as the Fangtian engine) has successfully run the Demo application on the device:

picture

The specific effect is shown in the figure above: the demo implements 3 windows, including two clock windows and a background window. Users can drag and zoom the windows by controlling the mouse.

This demo shows the basic functions of FangTian window engine window creation, destruction, cascading, multi-window, and the ability to identify and distribute input events, and can realize window movement, zooming and other operations through the mouse; FangTian SIG will focus on the window engine , and continue to bring users a new display experience.

Comprehensive understanding of Fangtian Engine

picture

Fangtian Engine mainly focuses on two parts: window display and window management. Here is an introduction to Fangtian Engine from two aspects of software architecture and protocol:

1. The overall architecture of FangTian Engine is C/S architecture. FangTian Client provides API for application developers or GUI framework developers. Set input etc. FangTian Server is the core of window display and window management capabilities. FangTian Server includes 2 services:

①Window display service , providing Buffer allocation rotation, Vsync, rendering, synthesis, display and other capabilities. Through the data-driven interface and unified rendering architecture, the high-performance and low-memory goals of Fangtian Engine are achieved.

②Window management service , providing the ability to create, destroy, move, zoom, and layout windows. Through the independent window policy module, it can adapt to various scenarios of mobile terminals, PC terminals and other devices.

In addition to the window display service and window management service included in Fangtian Engine, it also needs to rely on the input management service. It will provide input management services, provide input device management and input event identification and distribution operations, and realize unified management of various peripherals such as touch screens, mice, keyboards, and touchpads, for adaptation and simplification of multi-mode input interactions Scenes.

2. The client and server interact through the FT protocol. The main feature is to provide a unified rendering and data-driven interface, which is used to reduce the rendering load, reduce the amount of cross-process data interaction, and improve the animation capability and performance of the application.

The FT protocol mainly includes three parts: the basic window protocol, the self-drawing protocol, and the unified rendering protocol. The following mainly introduces the self-drawing protocol and the unified rendering protocol:

picture

Self-drawing , also called direct rendering, means that the application directly uses the CPU or GPU to complete image rendering, and the rendered data is shared to the server side through the Buffer. The self-drawing interface in the Fangtian engine sends the Surface (including the Buffer handle) to the server side, and the server side directly uses the rendered data for synthesis. The advantage of self-drawing is the inherent parallelism, and the rendering between applications can be performed in parallel without disturbing each other.

Unified rendering , different from the self-drawing mode, what is passed between C/S is not Surface, but 2D drawing instructions. In the server, the 2D instructions passed by different applications will be drawn uniformly. The advantage of unified rendering is that it can make full use of the occlusion information between windows during the rendering process and reduce repeated rendering.

Fangtian engine will use the above two rendering modes in combination, and will plan to cooperate with the GUI framework to realize the unified scheduling of rendering modes in the future, so as to reduce resource consumption while ensuring performance. In addition, in the unified rendering mode, Fangtian Engine will add data-driven capabilities, and only need to send corresponding change information between each frame, reducing instruction processing and rendering load.

Summarize

As a brand-new set of windowing engine, Fangtian Engine not only provides windowing display capabilities for applications, but also proposes a new FT protocol, adopts self-drawing + unified rendering architecture and data-driven expression, reduces the amount of interactive data between Cilent and Server, and achieves Improvements in performance, memory, power consumption, etc. This makes Fangtian Engine suitable for both PC and server scenarios, as well as mobile device scenarios.

FangTian SIG is currently in rapid iteration, and will continue to improve and provide more window capabilities in the future. For details, please pay attention to the homepage of FangTian Engine:

https://www.openeuler.org/zh/sig/sig-detail/?name=sig-FangTian

Guess you like

Origin blog.csdn.net/openEuler_/article/details/131959838