Method, device, storage medium and program product for partial update of ground glass under wayland compositor

By performing partial damage expansion and copy-back in the Wayland compositor, the GPU load issue caused by frosted glass updates in the Wayland compositor is resolved, improving rendering performance and user experience.

CN122489160APending Publication Date: 2026-07-31KYLIN CORP
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-17
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

The current Wayland synthesizer often causes unnecessary full-screen or large-area updates when updating frosted glass, increasing the GPU load, resulting in performance degradation and a poor user experience.

Method used

By performing necessary damage expansion and copying within the frosted glass area, the local update area is statistically analyzed and determined, reducing unnecessary rendering times and areas.

Benefits of technology

Partial updates were implemented, reducing GPU resource consumption and improving rendering performance and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122489160A_ABST
    Figure CN122489160A_ABST
Patent Text Reader

Abstract

This invention relates to a method, apparatus, storage medium, and program product for local updating of frosted glass in the Wayland synthesizer. The method involves expanding the damage within the frosted glass region after the Wayland synthesizer's damage statistics are completed, and treating the expanded area as newly added damage. This newly added damage region is divided into an expanded damage region and a copy-back damage region. Each time an expanded damage region is calculated, it is necessary to determine whether the region falls within the upper-layer frosted glass region. If the region does fall within the upper-layer frosted glass region, it needs to be expanded again and treated as newly added damage. The expanded damage within the newly added damage region continues to be calculated with the upper-layer frosted glass nodes to achieve the purpose of local updating of the frosted glass, reducing the consumption of GPU resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of visualization technology, and more specifically to a method, apparatus, storage medium, and program product for local updating of frosted glass under the Wayland synthesizer. Background Technology

[0002] Currently, mainstream Wayland synthesizers internationally either directly expand the damage (regardless of where the damage occurs) or directly update the entire frosted glass area or perform a full-screen update when updating the frosted glass. This increases the area that the synthesizer needs to update, thus increasing the burden on the GPU.

[0003] Chinese Invention Patent (Authorization No. CN201610937582, Image Processing Method and Apparatus) discloses an image processing method and apparatus, belonging to the field of image processing technology. The method includes: when a change is detected in the current window of an application, acquiring a target image of a first target region, wherein the first target region is a region obscured by the current first window of the application; performing Gaussian blur processing on the target image to obtain a Gaussian blurred image; and drawing the Gaussian blurred image as the background image of the first window onto the first window, thereby achieving a frosted glass effect. The apparatus includes: an acquisition module, a processing module, and a drawing module. In this invention, by performing Gaussian blur processing on the target image to obtain a Gaussian blurred image, and by using the Gaussian blurred image as the background image of the first window to draw onto the first window, the first window achieves a frosted glass effect, increasing the amount of information displayed by the first window.

[0004] The invention involves blurring the first target area when the area obscured by the first window is updated. To illustrate the specific relationship between the target area and the area obscured by the first window, it can be considered that the entire frosted glass area is being updated.

[0005] Chinese Invention Patent (Authorization No. CN201510526281, A Method and Apparatus for Processing Frosted Glass Effects in Image Data) provides a method and apparatus for processing frosted glass effects in image data. The method is applied to a GPU, which pre-creates a first frame buffer and a set of new frame buffers. Image data drawn in the first frame buffer is used for display. The method includes: drawing image data to be drawn into the first frame buffer; after the image data to be drawn is completed in the first frame buffer, drawing the image data to be drawn into the set of new frame buffers, and performing blurring processing on the image data to be drawn according to a Gaussian blur algorithm; and drawing the blurred image data onto the image data drawn in the first frame buffer. This invention performs the drawing of the image data to be drawn and the blurring processing of the image data according to the Gaussian blur algorithm both within the GPU, greatly improving the processing efficiency of the frosted glass effect in image data.

[0006] The application does not address the issue of local updates to the frosted glass; it only uses a GPU for blurring.

[0007] The current Wayland compositor often calculates a larger damage than the actual area to be rendered when processing frosted glass windows.

[0008] For example, when a client uses a frosted glass effect with a blinking cursor in its background, the entire window's frosted glass is updated directly. When multiple frosted glass windows exist, moving one of the frosted glass windows updates the entire screen. Another approach is that when another window's cursor is blinking, instead of simply redrawing the damage area submitted by the client, the area is expanded by the frosted glass radius. Summary of the Invention

[0009] To address the shortcomings of existing technologies, this invention provides a method for localized updating of the frosted glass under a Wayland synthesizer, comprising the following steps: Step S1: Initialize the overall damage region and the global extended damage blur region; Step S2: Traverse the window nodes with frosted glass in top-to-bottom order. If the traversal is complete, proceed to step S7. Step S3: Determine the first initial damage blur region of the current node based on the intersection of the visible blur region of the current node and the overall damage region; Step S4: Determine the first extended damage blur region of the current node based on the first initial damage blur region; Step S5: Determine the new global extended damage blur region for the current node based on the first extended damage blur region and the global extended damage blur region of the current node: If it is empty, then jump to step S2 and traverse the next node; If not empty, then the second extended damage blur region of all parent nodes of the current node is determined based on the newly added global extended damage blur region of the current node. Step S6: Add the first extended damage blur region of the current node to the overall damage region, add the first extended damage blur region of the current node to the global extended damage blur region, and then jump to step S2 to traverse the next node; Step S7: Complete the rendering based on the overall damage area.

[0010] Step S4 further includes: determining the first copy damage blur region based on the first extended damage blur region.

[0011] In step S6, the first copy damage blur region is also added to the overall damage region.

[0012] In step S5, when the newly added global extended damage blur region of the current node is not empty, the second extended damage blur region of all parent nodes of the current node is determined using the following method: Step S51: Determine the newly added global extended damage blur region of the current node as the initial newly added global extended damage blur region; Traverse all parent nodes of the current node in bottom-up order, and determine the intersection of the initially added global extended damage blur region and the visible blur region of the parent node as the second initial damage blur region of the parent node. Determine the second extended damage blur region of the parent node based on the second initial damage blur region of the parent node. Step S52: Add the second extended damage blur region of the upper-level node to the initial newly added global extended damage blur region; Add the second extended damage blur region of the upper-level node to the overall damage region, and add the second extended damage blur region of the upper-level node to the global extended damage blur region; Based on the updated initial newly added global extended damage blur region, execute step S51 again until all parent nodes of the current node have been traversed.

[0013] In step S51, after determining the second extended damage blur region of the upper-level node, the second copy damage blur region is determined based on the second extended damage blur region; in step S52, the second copy damage blur region is also added to the overall damage region.

[0014] The present invention further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described in any of the preceding claims.

[0015] The present invention further provides a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps of any of the methods described above.

[0016] The present invention further provides a computer program product, comprising a computer program, characterized in that, when the computer program is executed by a processor, it implements the steps of the method described in any of the above-mentioned embodiments.

[0017] This invention reduces unnecessary update damage, thereby reducing the number of rendering operations and the area affected, thus improving rendering performance and user experience. Attached Figure Description

[0018] Figure 1 This is a scenario diagram illustrating the implementation of the frosted glass local update method under the Wayland synthesizer of the present invention. Detailed Implementation

[0019] To gain a better understanding of the technical solution and beneficial effects of the present invention, the technical solution of the present invention and its beneficial effects are described in detail below with reference to the accompanying drawings.

[0020] In this invention, the terminology used and its interpretation are as follows: Wayland synthesizer: refers to the service in the operating system used to manage clients, synthesize all client content into display frames, and send them to the hardware device for display output. Wayland synthesizer is a type of Wayland synthesizer in the operating system.

[0021] Frosted Glass: Frosted glass is a display effect in Wayland's synthesizer. It's a method that uses translucency, blurring, and layering to enhance visual appeal, create information hierarchy, and deliver a refined and delicate feel. The principle is to process a specific area of ​​the image the operating system intends to display to the user using various blurring algorithms (such as Gaussian, rectangular, and kawse), and then use it as the background or final effect.

[0022] Blur radius: It essentially defines how many surrounding pixels a pixel will be affected when a blur effect is applied.

[0023] Node: The smallest unit that needs to be displayed on the desktop operating system. A window in the Wayland client can be considered a node.

[0024] Damage: Damage is a direct translation of the English word "damage". In a graphics display system, it refers to the area where the image of the next frame has changed compared to the previous frame.

[0025] To address the shortcomings of existing technologies, this invention provides a method for local updating of frosted glass in a Wayland synthesizer. After the damage statistics of the Wayland synthesizer are completed, the damage in the frosted glass region is expanded as necessary to achieve the purpose of local updating of frosted glass and reduce the consumption of GPU resources.

[0026] After the damage statistics are completed, this method expands the area falling within the visible frosted glass region and treats the expanded area as the newly added damage.

[0027] The newly added damage area is divided into an extended damage area and a copy-back damage area.

[0028] Each time an extended damage area is calculated, it needs to be determined whether the area falls within the upper frosted glass area. If the area falls within the upper frosted glass area, it needs to be extended again and added as a new damage. The extended damage in the new damage continues to be calculated with the upper frosted glass nodes.

[0029] Adding (merging) all newly added damages to the damages that have been statistically completed completes the necessary expansion of damages, and the frosted glass can be updated locally.

[0030] Wayland synthesizer's method for local updating of frosted glass, with Figure 1For example, there are four empty windows from top to bottom: window 1 (with frosted glass effect), window 2 (a WPS document without frosted glass effect), window 3 (with frosted glass effect), and window 4 (a video playback window whose screen changes in real time and generates damage in real time).

[0031] Step S1: Initialize the overall damage region and the global extended damage blur region.

[0032] In this invention, the initial overall damage area is the area that changes but is not occluded. Figure 1 In the middle, the area of ​​window 4 that is not obscured by window 2 is area 1 enclosed by the yellow line.

[0033] The initial global extended damage blur region is empty.

[0034] To be clearer, in this invention, the term "unobstructed" refers to the area not obstructed by a non-frosted glass window. If there are frosted glass nodes above the window, the area covered by the frosted glass nodes is not "obstructed" as defined in this invention.

[0035] Step S2: Traverse the window nodes with frosted glass in top-to-bottom order. If the traversal is complete, proceed to step S7.

[0036] In this scheme, following the top-to-bottom order, window 1 (hereinafter referred to as node 1) is traversed first, and then window 3 (hereinafter referred to as node 2) is traversed.

[0037] Step S3: Determine the first initial damage blur region of the current node based on the intersection of the visible blur region of the current node and the overall damage region; The visible blur area of ​​a node is the area of ​​the node that is not obscured: For node 1, since it is at the top, the entire window is not obscured, so the entire window is the visible blur area; for node 2, since there is a WPS document above it, the area of ​​the node that is not obscured by the WPS document is the visible blur area.

[0038] Therefore, the first initial damage blur regions of node 1 and node 2 are respectively Figure 1 Areas 2 and 5 are circled by the red lines in the middle.

[0039] Step S4: Determine the first extended damage blur region of the current node based on the first initial damage blur region, and determine the first copy damage blur region based on the first extended damage blur region.

[0040] For node 1, its first extended damage blur region is Figure 1 The area 3 (shaped like a "┘") surrounding its first initial damage blur area (area 2) is enclosed by a green line, while the first copy damage blur area is... Figure 1 The area 4 (shaped like a "┘") is surrounded by black lines around its first extended damage blur area (area 3).

[0041] For node 2, its first extended damage blur region is Figure 1 The area 6 (shaped like a "ㄩ") surrounding its first initial damage blur area (area 5) is enclosed by green lines, while the first copy damage blur area is... Figure 1 The area 7 (shaped like a "ㄩ") is surrounded by black lines around its first extended damage blur area (area 6).

[0042] Step S5: Determine the new global extended damage blur region of the current node based on the first extended damage blur region and the global extended damage blur region of the current node: If it is empty, jump to step S2 and traverse the next node; if it is not empty, execute steps S51 to S52.

[0043] The newly added global extended damage blur region for the current node is the portion added to the first extended damage blur region of the current node relative to the global extended damage blur region: When traversing node 1, since the global extended damage blur region is empty, the newly added global extended damage blur region is the first extended damage blur region of node 1, which is region 3. After traversing node 1, region 3 will be added to the global extended damage blur region (step S6 below). Thus, when traversing node 2, the global extended damage blur region is region 3, and the newly added global extended damage blur region is the first extended damage blur region of node 2, which is region 6.

[0044] Step S51: Determine the newly added global extended damage blur region of the current node as the initial newly added global extended damage blur region; Traverse all parent nodes of the current node in bottom-up order, and determine the intersection of the initially added global extended damage blur region and the visible blur region of the parent node as the second initial damage blur region of the parent node. Determine the second extended damage blur region of the parent node based on the second initial damage blur region of the parent node, and determine the second copy damage blur region based on the second extended damage blur region. Step S52: Add the second extended damage blur region of the upper-level node to the initial newly added global extended damage blur region; Add the second extended damage blur region and the second copy damage blur region of the upper-level node to the overall damage region, and add the second extended damage blur region of the upper-level node to the global extended damage blur region; Based on the updated initial newly added global extended damage blur region, step S51 is executed again until all parent nodes of the current node have been traversed. For node 1, although its newly added extended damage blur region is not empty, steps S51 and S52 are skipped because it has no parent nodes.

[0045] For node 2, its newly added extended damage blur region is region 6, and its parent node is node 1. When traversing to node 1, the newly added extended damage blur region, that is, region 6, intersects with the visible blur region of node 1. Figure 1 The area 8, circled by the blue line, needs to be identified as the second initial damage blur area. Following the method used to determine the first extended damage blur area and the first copied damage blur area, the second extended damage blur area and (assuming it's area 9) the second copied damage blur area (not shown in the figure) of the second initial damage blur area are determined. This is to eliminate the influence of the changed area on the unchanged area through the first extended damage blur area and the second extended damage blur area, and to eliminate the influence of the unchanged area on the first extended area through the first copied damage blur area and the second copied damage blur area.

[0046] Assuming there is a node 0 above node 1, when traversing to node 0, the initial newly added global extended damage blur region is the union of the newly added global extended damage blur region of node 2 (region 6) and the second extended damage blur region of node 1 (region 9), that is, region 6 + region 9. At this time, the second extended damage blur region of node 0 is determined based on the intersection of region 6 and region 9 with the visible area of ​​node 0.

[0047] Step S6: Add the first extended damage blur region and the first copy damage blur region of the current node to the overall damage region, and add the first extended damage blur region of the current node to the global extended damage blur region. Then jump to step S2 and traverse the next node.

[0048] Step S7: Complete the rendering based on the overall damage area.

[0049] In summary, combining Figure 1 The scenario shown and the overall operation steps above, Figure 1 In the scenario shown, a complete method for local updating of frosted glass includes the following steps.

[0050] 1. Initialize the overall damage region to obtain region 1; initialize the global extended damage blur region to be empty.

[0051] 2. Traverse node 1 to obtain the first initial damage blur region (region 2), the first extended damage blur region (region 3), and the first copy damage blur region (region 4) of node 1.

[0052] 3. Based on the first extended damage blur region (region 3) of node 1 and the global extended damage blur region, determine the newly added global extended damage blur region (region 3).

[0053] 4. Traverse the parent nodes of node 1. Since node 1 has no parent nodes, this step ends.

[0054] 5. Add the first extended damage blur region (region 3) and the first copy damage blur region (region 4) of node 1 to the overall damage region. At this time, the overall damage region is region 1 + region 3 + region 4. Add the first extended damage blur region (region 3) of node 1 to the global extended damage blur region. At this time, the global extended damage blur region is region 3.

[0055] 6. Traverse node 2 to obtain the first initial damage blur region (region 5), the first extended damage blur region (region 6), and the first copy damage blur region (region 7) of node 2.

[0056] 7. Based on the first extended damage blur region (region 6) of node 2 and the global extended damage blur region (region 3), determine the newly added global extended damage blur region (region 6).

[0057] 8. Traverse the parent node 1 of node 2. Based on the intersection of the newly added global extended damage blur region (region 6) and the visible blur region of node 1, determine the second initial damage blur region (region 8) of the parent node 1. Based on the second initial damage blur region (region 8) of the parent node 1, determine the second extended damage blur region of the parent node (not shown in the figure). Based on the second extended damage blur region, determine the second copy damage blur region (not shown in the figure).

[0058] 9. Add the second extended damage blur region and the second copy damage blur region of the upper-level node to the overall damage region, and add the second extended damage blur region of the upper-level node to the global extended damage blur region.

[0059] 10. Complete the rendering based on the overall damage area.

[0060] It should be noted that the extended damage blur area of ​​the node and the copy damage blur area do not exceed the location of the node window.

[0061] This invention reduces unnecessary update damage, thereby reducing the number of rendering operations and the area affected, thus improving rendering performance and user experience.

[0062] Although the present invention has been described using the above preferred embodiments, it is not intended to limit the scope of protection of the present invention. Any changes and modifications made by those skilled in the art to the above embodiments without departing from the spirit and scope of the present invention shall still fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be defined by the claims.

Claims

1. A method for local renewal of frosted glass under a Wayland synthesizer, characterized in that, Includes the following steps: Step S1: Initialize the overall damage region and the global extended damage blur region; Step S2: Traverse the window nodes with frosted glass in top-to-bottom order. If the traversal is complete, proceed to step S7. Step S3: Determine the first initial damage blur region of the current node based on the intersection of the visible blur region of the current node and the overall damage region; Step S4: Determine the first extended damage blur region of the current node based on the first initial damage blur region; Step S5: Determine the new global extended damage blur region for the current node based on the first extended damage blur region and the global extended damage blur region of the current node: If it is empty, then jump to step S2 and traverse the next node; If not empty, then the second extended damage blur region of all parent nodes of the current node is determined based on the newly added global extended damage blur region of the current node. Step S6: Add the first extended damage blur region of the current node to the overall damage region, add the first extended damage blur region of the current node to the global extended damage blur region, and then jump to step S2 to traverse the next node; Step S7: Complete the rendering based on the overall damage area.

2. The method of claim 1, wherein the Wayland compositor ground glass partial update method is characterized by, Step S4 further includes: determining the first copy damage blur region based on the first extended damage blur region.

3. The method for local renewal of the frosted glass under the Wayland synthesizer as described in claim 2, characterized in that, In step S6, the first copy damage blur area is also added to the overall damage area.

4. The method for local renewal of the ground glass under the Wayland synthesizer as described in claim 1, characterized in that, In step S5, if the newly added global extended damage blur region of the current node is not empty, the second extended damage blur region of all parent nodes of the current node is determined using the following method: Step S51: Determine the newly added global extended damage blur region of the current node as the initial newly added global extended damage blur region; Traverse all parent nodes of the current node in bottom-up order, and determine the intersection of the initially added global extended damage blur region and the visible blur region of the parent node as the second initial damage blur region of the parent node. Determine the second extended damage blur region of the parent node based on the second initial damage blur region of the parent node. Step S52: Add the second extended damage blur region of the upper-level node to the initially added global extended damage blur region; Add the second extended damage blur region of the upper-level node to the overall damage region, and add the second extended damage blur region of the upper-level node to the global extended damage blur region; Based on the updated initial newly added global extended damage blur region, execute step S51 again until all parent nodes of the current node have been traversed.

5. The method for local renewal of the frosted glass under the Wayland synthesizer as described in claim 4, characterized in that, In step S51, after determining the second extended damage blur region of the upper-level node, the second copy damage blur region is determined based on the second extended damage blur region; in step S52, the second copy damage blur region is also added to the overall damage region.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1-5.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1-5.

8. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1-5.