{"id":35315,"date":"2024-11-11T13:21:23","date_gmt":"2024-11-11T05:21:23","guid":{"rendered":"https:\/\/www.deepin.org\/?p=35315"},"modified":"2024-12-17T10:21:08","modified_gmt":"2024-12-17T02:21:08","slug":"dde-treeland","status":"publish","type":"post","link":"https:\/\/www.deepin.org.cn\/en\/dde-treeland\/","title":{"rendered":"Unveiling the Treeland Technology Behind DDE(deepin Desktop Environment)"},"content":{"rendered":"<img loading=\"lazy\" class=\"alignnone size-full wp-image-35335\" src=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2024\/11\/\u56fe\u72472-1.png\" alt=\"\" width=\"1876\" height=\"799\" srcset=\"https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u56fe\u72472-1.png 1876w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u56fe\u72472-1-300x128.png 300w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u56fe\u72472-1-1024x436.png 1024w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u56fe\u72472-1-150x64.png 150w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u56fe\u72472-1-768x327.png 768w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u56fe\u72472-1-1536x654.png 1536w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u56fe\u72472-1-24x10.png 24w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u56fe\u72472-1-36x15.png 36w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u56fe\u72472-1-48x20.png 48w\" sizes=\"(max-width: 1876px) 100vw, 1876px\" \/><\/p>\n<p>Recently, the deepin\u00a0 community made an appearance at COSCon'24, the 9th China Open Source Conference, where senior desktop R&amp;D engineer Zhang Dingyuan presented a technical sharing session titled \"Treeland: The Stepping Stone of DDE's Progress.\"<\/p>\n<p class=\"last-node\">Taking this opportunity, let's discuss how to pursue gorgeous animations and smooth experiences while maintaining a lightweight and efficient system. It's like playing a balancing game, with designers and architects standing at opposite ends of a scale, one side being a visual feast and the other a performance beast. Striking the balance between these two requires our R&amp;D team to cleverly \"sacrifice\" some hair (brainpower) to achieve.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-35317 aligncenter\" src=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2024\/11\/0D0A0139-3287530174.jpg\" alt=\"\" width=\"1600\" height=\"1066\" srcset=\"https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/0D0A0139-3287530174.jpg 1600w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/0D0A0139-3287530174-300x200.jpg 300w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/0D0A0139-3287530174-1024x682.jpg 1024w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/0D0A0139-3287530174-150x100.jpg 150w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/0D0A0139-3287530174-768x512.jpg 768w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/0D0A0139-3287530174-1536x1023.jpg 1536w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/0D0A0139-3287530174-24x16.jpg 24w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/0D0A0139-3287530174-36x24.jpg 36w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/0D0A0139-3287530174-48x32.jpg 48w\" sizes=\"(max-width: 1600px) 100vw, 1600px\" \/><\/p>\n<p style=\"text-align: center;\">deepin in\u00a0 COSCon'24<\/p>\n<p>&nbsp;<\/p>\n<h1 style=\"text-align: center;\"><strong>Historical Background<\/strong><\/h1>\n<p>During the deepin 15 era, the development team utilized Mutter to provide smooth graphics effects for high-performance devices and Metacity to ensure system fluidity on low-specification devices. However, in the deepin 20 era, the team decided to adopt KWin as the new window manager due to its robust features and the ability to disable compositing, making it adaptable to various hardware configurations. As a result, the combination of Mutter and Metacity was abandoned to ensure a smooth and secure graphical interface experience across different devices. Nevertheless, the continuous advancement of technology has once again prompted us to face technological innovation.<\/p>\n<p>&nbsp;<\/p>\n<h1 style=\"text-align: center;\"><strong>Technical Choices: X11 and Wayland<\/strong><\/h1>\n<p>Currently, under Linux, there are two technology stacks: the long-standing X11 and the relatively newer Wayland. Let's compare these two technologies together.<\/p>\n<div class=\"su-table su-table-alternate\">\n<table style=\"border-collapse: collapse; width: 521.42pt;\" border=\"0\" width=\"869\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr style=\"height: 15.60pt;\">\n<td style=\"height: 15.60pt; width: 136.20pt;\" width=\"227\" height=\"26\"><\/td>\n<td class=\"et3\" style=\"width: 206.40pt;\" width=\"344\">X11<\/td>\n<td class=\"et3\" style=\"width: 178.80pt;\" width=\"298\">Wayland<\/td>\n<\/tr>\n<tr style=\"height: 46.80pt;\">\n<td style=\"height: 46.80pt;\" height=\"78\">Architecture<\/td>\n<td class=\"et3\" style=\"width: 206.40pt;\" width=\"344\">The traditional client-server model, supporting network transmission and remote display.<\/td>\n<td class=\"et3\" style=\"width: 178.80pt;\" width=\"298\">Simplified design, removing the complexity of the \u00d7 server, improving efficiency and response speed, focusing on local display.<\/td>\n<\/tr>\n<tr style=\"height: 46.80pt;\">\n<td style=\"height: 46.80pt;\" height=\"78\">Performance<\/td>\n<td class=\"et3\" style=\"width: 206.40pt;\" width=\"344\">Due to its outdated design, performance is suboptimal in modern scenarios, relying on extensions and patches to achieve modern graphical effects.<\/td>\n<td class=\"et3\" style=\"width: 178.80pt;\" width=\"298\">Modernized design, simplified rendering process, with significant performance improvements, especially in animation and window operations.<\/td>\n<\/tr>\n<tr style=\"height: 46.80pt;\">\n<td style=\"height: 46.80pt;\" height=\"78\">Security<\/td>\n<td class=\"et3\" style=\"width: 206.40pt;\" width=\"344\">Significant security issues, applications can access each other's window information and are susceptible to interference from malicious programs.<\/td>\n<td class=\"et3\" style=\"width: 178.80pt;\" width=\"298\">Strong application isolation, unable to access the graphics or input\/output of other programs, ensuring high security.<\/td>\n<\/tr>\n<tr style=\"height: 46.80pt;\">\n<td style=\"height: 46.80pt;\" height=\"78\">Scalability and Compatibility<\/td>\n<td class=\"et3\" style=\"width: 206.40pt;\" width=\"344\">X11 has very extensive application support and compatibility, with many old applications and desktop environments still relying on the X11 protocol.<\/td>\n<td class=\"et3\" style=\"width: 178.80pt;\" width=\"298\">Gradually supported by mainstream desktop environments, but the ecosystem is not as widespread as X11, requiring compatibility layers to run X11 applications.<\/td>\n<\/tr>\n<tr style=\"height: 31.20pt;\">\n<td style=\"height: 31.20pt;\" height=\"52\">Input Device Support<\/td>\n<td class=\"et3\" style=\"width: 206.40pt;\" width=\"344\">Mature support for traditional input devices, but not flexible enough in multi-touch and gesture support.<\/td>\n<td class=\"et3\" style=\"width: 178.80pt;\" width=\"298\">Optimized support for modern hardware, especially in multi-touch and gesture recognition.<\/td>\n<\/tr>\n<tr style=\"height: 46.80pt;\">\n<td style=\"height: 46.80pt;\" height=\"78\">Remote Desktop and Network Transparency<\/td>\n<td class=\"et3\" style=\"width: 206.40pt;\" width=\"344\">Supports the remote transmission of display content over the network, suitable for professional use.<\/td>\n<td class=\"et3\" style=\"width: 178.80pt;\" width=\"298\">Lacks X11's network transparency, with limited remote desktop functionality, often requiring third-party tools.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<section><\/section>\n<p>In summary, X11, as a veteran display server, boasts extensive compatibility and a mature ecosystem. However, its architecture has certain limitations in terms of security, performance, and ease of use. In contrast, Wayland, as an emerging display server, simplifies the communication process between clients and servers, reducing potential security vulnerabilities and thus enhancing overall security.<\/p>\n<p class=\"last-node\">Furthermore, Wayland has significant advantages in performance, being better equipped to support modern display technologies, such as high-resolution and high-frame-rate display tasks. Lastly, Wayland's architectural design makes its configuration and management relatively straightforward, resulting in a more user-friendly experience, which helps attract more novice users.<\/p>\n<p>&nbsp;<\/p>\n<h1 style=\"text-align: center;\"><strong>Architectural Design and the New Window Manager Treeland<\/strong><\/h1>\n<p>From a technical perspective, we believe it is time to update our technical solution. The former model of X11 + window manager + compositor was flexible but did not meet the demands. Wayland offers an updated mechanism that avoids screen tearing by integrating the window manager, compositor, and display system at the foundation level.<\/p>\n<p>Therefore, DDE decided to develop a new window manager\u2014Treeland\u2014in conjunction with Wayland. It uses wlroots as the underlying Wayland base library, without modifying the wlroots code, allowing for synchronization with upstream progress at any time to obtain new features and fixes. The upper layer uses Qt, making the technology stack more unified. It is designed specifically to meet the needs of DDE, avoiding common issues such as destructive adjustments, synchronization problems, and maintenance costs associated with using third-party window managers.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-35319 aligncenter\" src=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_173130234594.png\" alt=\"\" width=\"1024\" height=\"398\" srcset=\"https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_173130234594.png 1024w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_173130234594-300x117.png 300w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_173130234594-150x58.png 150w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_173130234594-768x299.png 768w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_173130234594-24x9.png 24w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_173130234594-36x14.png 36w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_173130234594-48x19.png 48w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>The diagram above illustrates which projects or interfaces Treeland will use overall to complete its functions.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-35320 aligncenter\" src=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023525415.png\" alt=\"\" width=\"1080\" height=\"661\" srcset=\"https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023525415.png 1080w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023525415-300x184.png 300w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023525415-1024x627.png 1024w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023525415-150x92.png 150w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023525415-768x470.png 768w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023525415-24x15.png 24w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023525415-36x22.png 36w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023525415-48x29.png 48w\" sizes=\"(max-width: 1080px) 100vw, 1080px\" \/><\/p>\n<p style=\"text-align: center;\">Treeland Structure Diagram<\/p>\n<p>&nbsp;<\/p>\n<h1 style=\"text-align: center;\"><strong>Treeland's Technical Structure and Features<br \/>\n<\/strong><\/h1>\n<section>\n<section>\n<section>\n<section>\n<section>\n<section><\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<\/section>\n<section>\n<h2><strong>1\u3001Important Project Introduction<\/strong><\/h2>\n<\/section>\n<section><\/section>\n<section>\n<section>\n<ul>\n<li>Qwlroots: Qt bindings for wlroots, converting Wayland signals into Qt-style signals.<\/li>\n<li>Waylib: Encapsulates wlroots components into QtQuick objects, using QPA to provide event translation and distribution for Treeland.<\/li>\n<li class=\"last-node\">DtkDeclarative: QtQuick components of DTK, encapsulating most DTK style controls.<\/li>\n<\/ul>\n<\/section>\n<\/section>\n<p>In Waylib, the QPA (Qt Platform Abstraction) plays a crucial role. System-level events first enter Waylib, where they are converted into internal Qt events and sent to the upper layers. When a user clicks on a window, Treeland generates an event through Waylib and sends it to the client, completing the interface interaction.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-35321 aligncenter\" src=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023564735.png\" alt=\"\" width=\"871\" height=\"674\" srcset=\"https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023564735.png 1024w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023564735-300x232.png 300w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023564735-150x116.png 150w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023564735-768x595.png 768w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023564735-24x19.png 24w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023564735-36x28.png 36w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023564735-48x37.png 48w\" sizes=\"(max-width: 871px) 100vw, 871px\" \/><\/p>\n<p style=\"text-align: center;\">Treeland's Process for Handling Underlying and Upper-layer Events.<\/p>\n<p>&nbsp;<\/p>\n<h2>2\u3001Interface Effects and Optimization<\/h2>\n<ul>\n<li><strong>Rounded Corners:<\/strong><\/li>\n<\/ul>\n<div class=\"pop-container\">\n<div class=\"popcontent-hole\">\n<div class=\"pop-content\">\n<div class=\"normal___qxduM\">\n<div class=\"\">\n<div id=\"chat-markdown-csotk84rmeeekvuqdqag-0-0\">\n<div class=\"markdown___vuBDJ\">\n<p>DDE and deepin community applications extensively use window rounded corners. Treeland provides its own corner-cutting widget, with a new shaping algorithm that reduces the number of geometric vertices and computational load, and employs a new anti-aliasing algorithm to improve GPU performance. QtQuick rounded corners are provided by the Rectangle component, which can only operate on all four corners at the same time (red block). However, DTK programs have the capability of irregular window shapes, so Treeland offers its own corner-cutting widget (yellow block).<\/p>\n<p>The new shaping algorithm reduces the number of geometric vertices by 50% compared to the native Rectangle of QtQuick, and the performance of GPU vertex rendering and triangle tessellation is increased by 100%.<\/p>\n<p class=\"markdown___vuBDJ\">By adopting the new anti-aliasing algorithm, the performance of the GPU fragment shader is improved, reducing the computational load to 1\/4 compared to the standard 4xMSAA anti-aliasing algorithm.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-35322 aligncenter\" src=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023629805.png\" alt=\"\" width=\"256\" height=\"253\" srcset=\"https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023629805.png 256w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023629805-150x148.png 150w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023629805-100x100.png 100w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023629805-24x24.png 24w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023629805-36x36.png 36w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023629805-48x48.png 48w\" sizes=\"(max-width: 256px) 100vw, 256px\" \/><\/p>\n<p style=\"text-align: center;\">Red for QtQuick rounded corners \/ Yellow for Treeland rounded corners.<\/p>\n<ul>\n<li><strong>Blur\uff1a<\/strong><\/li>\n<\/ul>\n<p>The blur component in QtQuick only supports blurring the control itself, which does not meet the needs of Treeland. Treeland re-implements the blur component, capable of obtaining image data from the memory below the component and using a fusion blur algorithm to optimize performance.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-35323 aligncenter\" src=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023672093.png\" alt=\"\" width=\"714\" height=\"417\" srcset=\"https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023672093.png 512w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023672093-300x175.png 300w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023672093-150x88.png 150w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023672093-24x14.png 24w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023672093-36x21.png 36w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023672093-48x28.png 48w\" sizes=\"(max-width: 714px) 100vw, 714px\" \/><\/p>\n<p style=\"text-align: center;\">QtQuick Blur Component<\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-35324 aligncenter\" src=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023714144.png\" alt=\"\" width=\"734\" height=\"426\" srcset=\"https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023714144.png 512w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023714144-300x174.png 300w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023714144-150x87.png 150w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023714144-24x14.png 24w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023714144-36x21.png 36w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023714144-48x28.png 48w\" sizes=\"(max-width: 734px) 100vw, 734px\" \/><\/p>\n<p style=\"text-align: center;\">Treeland Blur Component<\/p>\n<ul>\n<li><strong>Shadows\uff1a<\/strong><\/li>\n<\/ul>\n<p>Treeland uses BorderImage as the window shadow texture, manually creating texture materials through ImageProvider, allowing the same material to be reused for the same size.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-35325 aligncenter\" src=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023743230.png\" alt=\"\" width=\"855\" height=\"623\" srcset=\"https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023743230.png 828w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023743230-300x219.png 300w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023743230-150x109.png 150w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023743230-768x560.png 768w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023743230-24x18.png 24w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023743230-36x26.png 36w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023743230-48x35.png 48w\" sizes=\"(max-width: 855px) 100vw, 855px\" \/><\/p>\n<p>&nbsp;<\/p>\n<ul>\n<li><strong>Animations:<\/strong><\/li>\n<\/ul>\n<p>Directly use the animation components provided by QtQuick to provide animation effects for the interface. Define attribute changes for components using State and Transition, such as window maximization and restoration. Switching between two States triggers different Transitions to execute attribute changes. During attribute changes, use the animation components of QtQuick to complete the animation playback.<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>3\u3001Multi-user Feature<\/strong><\/h2>\n<p>As part of the solution, Treeland aims to enable multiple users to share a compositor. Compared to traditional models, DDM and Treeland redesign the workflow by separating Treeland. Users send window content to Treeland for composition and display through the same mechanism, saving memory and avoiding issues such as black screen flickering and state synchronization challenges.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-35326 aligncenter\" src=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023787017.png\" alt=\"\" width=\"831\" height=\"559\" srcset=\"https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023787017.png 725w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023787017-300x202.png 300w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023787017-150x101.png 150w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023787017-24x16.png 24w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023787017-36x24.png 36w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023787017-48x32.png 48w\" sizes=\"(max-width: 831px) 100vw, 831px\" \/><\/p>\n<p style=\"text-align: center;\">\u4e00\u4e2a\u7b80\u5316\u7684 DDM \u4e0e Treeland \u7684\u591a\u7528\u6237\u767b\u5f55\u6d41\u7a0b<\/p>\n<p>&nbsp;<\/p>\n<h2><strong>4\u3001Integration with systemd<\/strong><\/h2>\n<p>Each user session in DDE switches to a systemd service, and under the Treeland model, a separate service is loaded to inject display environment variables into the user session, using systemd's socket mechanism for lazy loading to ensure that the user-side windows are displayed correctly.<\/p>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-35327 aligncenter\" src=\"https:\/\/www.deepin.org\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023818484.png\" alt=\"\" width=\"793\" height=\"648\" srcset=\"https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023818484.png 1024w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023818484-300x245.png 300w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023818484-150x122.png 150w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023818484-768x627.png 768w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023818484-24x20.png 24w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023818484-36x29.png 36w, https:\/\/www.deepin.org.cn\/wp-content\/uploads\/2024\/11\/\u4f01\u4e1a\u5fae\u4fe1\u622a\u56fe_17313023818484-48x39.png 48w\" sizes=\"(max-width: 793px) 100vw, 793px\" \/><\/p>\n<p style=\"text-align: center;\">A Simplified Multi-user Login Process for DDM and Treeland<\/p>\n<p>&nbsp;<\/p>\n<h1 style=\"text-align: center;\"><strong>Summary<\/strong><\/h1>\n<p>The evolution of the Deepin Desktop Environment (DDE) in terms of window managers, from Mutter and Metacity, to KWin, and now to our own Treeland, demonstrates our ongoing innovation and improvement in system architecture and user experience.<\/p>\n<p>&nbsp;<\/p>\n<h1><strong>Related Readings:<\/strong><\/h1>\n<p>\uff081\uff09<a href=\"https:\/\/distrowatch.com\/table.php?distribution=deepin\">International Rankings for deepin<\/a><\/p>\n<p>\uff082\uff09<a href=\"https:\/\/www.deepin.org\/en\/dde\/\">deepin Desktop Environment\uff08DDE\uff09<\/a><\/p>\n<p>\uff083\uff09<a href=\"https:\/\/www.deepin.org\/zh\/category\/news%ef%bc%88chinese%ef%bc%89\/deepin-monthly-report\/\">deepin Community Monthly Report\u00a0<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<article id=\"post-34702\" class=\"post-34702 post type-post status-publish format-standard hentry category-community-news category-community-activities\">\n<div class=\"entry-content\">\n<p style=\"text-align: right;\">Content source: deepin community<\/p>\n<p style=\"text-align: right;\">Reprinted with attribution<\/p>\n<\/div>\n<\/article>","protected":false},"excerpt":{"rendered":"<p>Recently, the deepin\u00a0 community made an appearance at COSCon'24, the 9th China Open Source Conference, where senior desktop R&amp;D engineer Zhang Dingyuan presented a technical sharing session titled \"Treeland: The Stepping Stone of DDE's Progress.\" Taking this opportunity, let's discuss how to pursue gorgeous animations and smooth experiences while maintaining a lightweight and efficient system. It's like playing a balancing game, with designers and architects standing at opposite ends of a scale, one side being a visual feast and the other a performance beast. Striking the balance between these two requires our R&amp;D team to cleverly \"sacrifice\" some hair (brainpower) ...<a href=https:\/\/www.deepin.org.cn\/en\/dde-treeland\/>Read more<\/a><\/p>\n","protected":false},"author":11164,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[75,155,93,172],"tags":[],"_links":{"self":[{"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/posts\/35315"}],"collection":[{"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/users\/11164"}],"replies":[{"embeddable":true,"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/comments?post=35315"}],"version-history":[{"count":10,"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/posts\/35315\/revisions"}],"predecessor-version":[{"id":35337,"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/posts\/35315\/revisions\/35337"}],"wp:attachment":[{"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/media?parent=35315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/categories?post=35315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.deepin.org.cn\/en\/wp-json\/wp\/v2\/tags?post=35315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}