A display method, device and equipment based on the Wayland protocol without GPU support

By using the CPU to perform rendering and synthesis operations in a GPU-free environment and using cache space to process images, the applicability problem of the window management system is solved, and the display method based on the Wayland protocol is realized.

CN114116227BActive Publication Date: 2025-08-22PRANUS BEIJING TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111448152.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2025-08-22
Estimated Expiration
2041-11-29

AI Technical Summary

Technical Problem

Without GPU support, the window management system based on the Wayland protocol cannot be used normally or requires a lot of adjustments and modifications, resulting in reduced applicability.

Method used

The rendering and synthesis operations are performed through the CPU and the results are cached in the preset cache space, using shared memory and frame buffer components to achieve image processing, bypassing the needs of the GPU.

Benefits of technology

Supports a window management system based on the Wayland protocol without GPU, without modifying Wayland applications, and realizes rendering and synthetic display of images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114116227B_ABST
    Figure CN114116227B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a display method, device, electronic device, computer-readable storage medium, and computer program product based on the Wayland protocol without GPU support, relating to the field of graphical interfaces. The method comprises: upon receiving a rendering instruction sent by a Wayland application, invoking a CPU to perform a rendering operation, and caching the resulting rendering result in a first cache space; upon receiving a synthesis instruction for the rendering result, invoking a CPU to perform a synthesis rendering operation corresponding to the synthesis instruction, and caching the resulting synthesis rendering result in a second cache space. The method provided in the present application can still support a window management system based on the Wayland protocol without a GPU, and no modifications are required at the Wayland application level.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of graphical interfaces. Specifically, the present application relates to a display method, device, electronic device, computer-readable storage medium, and computer program product based on the Wayland protocol without GPU support. Background Art

[0002] In modern electronic devices, the GPU, as graphics acceleration hardware, is usually integrated with the CPU. Currently, window management systems developed based on the graphics rendering capabilities provided by the GPU at the hardware level and the Wayland protocol at the software level are widely used in various operating systems. As long as the application manufacturer carries out the necessary development based on the Wayland protocol (such applications are hereinafter referred to as Wayland applications), the above-mentioned window management system can support the display of the application, regardless of the type of Wayland application or other characteristics of the Wayland application. In some special scenarios, in order to enhance the capabilities of other cores or for other reasons, the CPU manufacturer will remove the GPU. Without GPU support, the window management system developed based on the Wayland protocol will not be able to be used normally or will require a lot of adjustments and modifications to the window management system, which greatly reduces the applicability of the window management system.

[0003] On the one hand, existing solutions such as Mesa 3D and SwiftShader, while achieving GPU simulation through software replacement, suffer from various drawbacks, such as lacking the crucial frame buffer component or lacking support for the Wayland protocol. On the other hand, existing technologies have also attempted to use other hardware alternatives to GPUs, but the actual results are often poor and fail to meet practical requirements.

[0004] Therefore, how to find a suitable solution to support the window management system based on the Wayland protocol is the most important issue at present. Summary of the Invention

[0005] The purpose of the embodiments of the present application is to provide a technical means to solve the lack of support for a window management system based on the Wayland protocol.

[0006] According to one aspect of an embodiment of the present application, a display method based on the Wayland protocol without GPU support is provided, the method comprising:

[0007] When receiving a rendering instruction sent by a Wayland application, the CPU is called to perform a rendering operation and the obtained rendering result is cached in the first cache space;

[0008] When a synthesis instruction for a rendering result is received, the CPU is called to execute a synthesis rendering operation corresponding to the synthesis instruction, and the obtained synthesis rendering result is cached in the second cache space.

[0009] In one possible implementation, upon receiving a rendering instruction sent by a Wayland application, calling the CPU to perform a rendering operation and caching the obtained rendering result in a first cache space includes:

[0010] When receiving the rendering instruction sent by the Wayland application, the CPU is called to perform the rendering operation and obtain the rendering result;

[0011] Cache the rendering results in shared memory, where the shared memory corresponds to the Wayland application.

[0012] In another possible implementation, after obtaining the rendering result, the following is further included:

[0013] Send update messages to the Wayland compositor;

[0014] Composition instructions are sent by the Wayland compositor in response to the update message.

[0015] In another possible implementation, caching the obtained composite rendering result in the second cache space includes:

[0016] Cache the composite rendering results in a framebuffer component for display.

[0017] In one possible implementation, the method further includes:

[0018] When initializing the Wayland application, binding the Wayland application to the first component;

[0019] or,

[0020] When initializing the Wayland compositor, bind the Wayland compositor to the first component.

[0021] According to another aspect of an embodiment of the present application, a device for displaying an application without GPU support is provided, the device comprising:

[0022] A first processing module is configured to, upon receiving a rendering instruction sent by a Wayland application, call the CPU to perform a rendering operation and cache the obtained rendering result in a first cache space;

[0023] The second processing module is configured to, when receiving a synthesis instruction for a rendering result, call the CPU to execute a synthesis rendering operation corresponding to the synthesis instruction, and cache the obtained synthesis rendering result in a second cache space.

[0024] According to another aspect of an embodiment of the present application, an electronic device is provided, comprising: a memory, a processor, and a computer program stored on the memory, wherein the processor executes the computer program to implement the steps of a display method based on the Wayland protocol without GPU support shown in the above aspect of the present application.

[0025] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of a display method based on the Wayland protocol without GPU support shown in the above aspect of the present application are implemented.

[0026] According to one aspect of an embodiment of the present application, a computer program product is provided, which includes a computer program. When the computer program is executed by a processor, it implements the steps of a display method based on the Wayland protocol without GPU support shown in the above aspect of the present application.

[0027] The beneficial effects of the technical solution provided by the embodiments of the present application are:

[0028] The present application provides a display method based on the Wayland protocol without GPU support. After the first component receives a rendering instruction or a synthesis instruction, it calls the CPU to perform the corresponding operation and caches the result of the operation in a preset space. Since the graphics processing capabilities provided by the GPU include not only how to perform image processing operations but also how to cache processing results, in the absence of a GPU, the image processing operations including rendering operations and synthesis rendering operations are handed over to the CPU for processing, and preset cache spaces are provided for caching the processing results respectively, and finally displayed. The method provided by the present application can support a window management system based on the Wayland protocol without a GPU, and no modifications are required at the Wayland application level. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments of the present application.

[0030] Figure 1 A schematic diagram of the working principle of a GPU-supported Wayland window management system provided in an embodiment of the present application;

[0031] Figure 2 A schematic diagram of the working principle of a Wayland window management system without GPU support provided in an embodiment of the present application;

[0032] Figure 3A flowchart of a display method based on the Wayland protocol without GPU support provided in an embodiment of the present application;

[0033] Figure 4 A schematic diagram of the structure of a display device based on the Wayland protocol without GPU support provided in an embodiment of the present application;

[0034] Figure 5 An electronic device is provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] The following describes the embodiments of the present application in conjunction with the accompanying drawings. It should be understood that the embodiments described below in conjunction with the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.

[0036] Those skilled in the art will understand that, unless otherwise stated, the singular forms "a", "an", "said", and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application mean that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements, and / or components, but do not exclude implementation as other features, information, data, steps, operations, elements, components, and / or combinations thereof supported by the present technical field. It should be understood that when we say that an element is "connected" or "coupled" to another element, the element can be directly connected or coupled to the other element, or it can refer to the element and the other element establishing a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used here can include wireless connection or wireless coupling. The term "and / or" used here indicates at least one of the items defined by the term, for example, "A and / or B" can be implemented as "A", or as "B", or as "A and B".

[0037] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0038] First, several terms involved in this application are introduced and explained:

[0039] The framebuffer is an interface provided by the Linux system that shields underlying differences in graphics hardware, abstracting the display buffer and allowing upper-level applications to directly read and write to the display buffer in graphics mode. For example, writing a color value to the area corresponding to a display point in the display buffer automatically displays the corresponding color on the screen or other hardware device. In the early days before GPUs, the framebuffer component was a crucial component used in the image processing process.

[0040] Wayland protocol: It is a communication protocol between the display server (Wayland compositor) and the client (Wayland application).

[0041] EGL: It serves as an intermediary interface between OpenGL components and native window management systems (e.g., Windows Window and Android SurfaceView). Introducing EGL can mask the differences between windows on different platforms. EGL can also serve as an interface between Wayland applications and OpenGL components.

[0042] As background information, Mesa 3D supports various software rendering methods and can simulate GPU functionality, but it does not support frame buffers. SwiftShader is a software library for high-performance graphics rendering on the CPU, enabling rendering operations on systems without a GPU. However, SwiftShader also does not support frame buffer devices and does not support the Wayland protocol.

[0043] See for example Figure 1 This application provides a schematic diagram of the working principle of a GPU-supported Wayland window management system. When initializing a Wayland application, environment variables are configured and cache space is created to cache the rendering results corresponding to the Wayland application. Then, a binding relationship is established between the EGL component and the OpenGLES component. When initializing a Wayland compositor, a binding relationship is also established between the EGL component and the OpenGLES component. After the composite rendering is completed, the GPU can cache the composite rendering results and display them on the display screen of the terminal device.

[0044] When the logical layer of at least one Wayland application has new content display instructions, specifically: the Wayland application sends a rendering instruction to the OpenGLES component. After receiving the instruction, the OpenGLES component calls the GPU driver of the Linux kernel layer to drive the GPU to perform rendering operations. On the other hand, the EGL component can send an update message to the Wayland compositor based on the Wayland protocol. After receiving the update message, the Wayland compositor sends a composite rendering instruction to the OpenGLES component. After receiving the rendering instruction, the OpenGLES component calls the GPU driver of the Linux kernel layer to drive the GPU to perform composite rendering operations to obtain a composite rendering result, which can be used for display on hardware devices such as screens.

[0045] Therefore, the GPU plays a crucial role in the image display process. If GPU hardware cannot be used in some scenarios, alternative solutions are necessary. One such alternative is to replace general-purpose hardware with specialized hardware. However, as mentioned above, the internal logic of software like the Wayland window management system is often directly tied to the GPU. Simply replacing specialized hardware with general-purpose hardware without modifying the relevant software would render this alternative solution unfeasible. Modifying the relevant software in existing technologies is often very complex and labor-intensive. For example, not only the Wayland window management system but also Wayland applications would need to be modified, making it impractical from a cost-effective perspective.

[0046] This application provides a Wayland protocol-based display method, apparatus, electronic device, computer-readable storage medium, and computer program product without GPU support, aiming to address the aforementioned technical problems of the prior art. The display method can be applied to terminal devices, including but not limited to mobile devices and computers. It should be noted that the operating system of the terminal device shown in the embodiments of this application runs a Wayland window management system, which can meet the display requirements of multiple Wayland applications.

[0047] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to, draw on, or combine with each other, and the same terms, similar features, and similar implementation steps in different embodiments will not be repeated.

[0048] For example, reference Figure 2 , an embodiment of the present application provides a schematic diagram of the working principle of a Wayland window management system without GPU support. When initializing a Wayland application, a corresponding shared memory is created, and then a binding relationship with a simulated OpenGLES component is created through an EGL component. When initializing a Wayland compositor, the kernel layer of the system provides a frame buffer component such as LinuxFB, which caches the content to be displayed on the screen of the terminal device, and creates a binding relationship between the compositor and the frame buffer component through an EGL component; secondly, a binding relationship is created between the Wayland compositor and the simulated OpenGLES component through an EGL component.

[0049] When the logical layer of at least one Wayland application has new content display instructions, specifically: the Wayland application sends a rendering instruction to the simulated OpenGLES component. After receiving the rendering instruction, the simulated OpenGLES component calls the CPU to perform a rendering operation and caches the rendering operation result in the shared memory corresponding to the at least one application. After the new content is in the shared memory, an update message is sent to the Wayland compositor via the EGL component. After receiving the update message, the Wayland compositor sends a compositing instruction to the simulated OpenGL ES component based on the contents in the multiple shared memories. After receiving the compositing instruction, the simulated OpenGL ES component calls the CPU to perform a compositing rendering operation to obtain a compositing rendering result, and caches the compositing rendering result in the frame buffer component.

[0050] Typically, GPU manufacturers provide libraries supporting EGL and OpenGL ES components when they ship GPU hardware. Therefore, without a GPU, the EGL components and simulated OpenGL ES components shown in the diagram above require support from the corresponding libraries. For example, the library supporting EGL components might be libEGL.so, and the library supporting simulated OpenGL ES components might be libGLESv2.so. Furthermore, the corresponding libraries can be modified to achieve the desired functionality.

[0051] Specifically, when initializing a Wayland application, a corresponding cache space is created. This cache space can be shared memory created for the Wayland application by the operating system based on the Wayland protocol. The environment variable EGL_PLATFORM=wayland or EGL_DISPLAY=wayland corresponding to the Wayland application is set in the EGL component, so that the EGL component establishes a contextual relationship, i.e., a binding relationship, between the Wayland application and the simulated OpenGLES component based on this environment variable. Through this contextual relationship, the simulated OpenGLES component can write rendering results to the shared memory.

[0052] Specifically, when initializing the Wayland compositor, the environment variable EGL_PLATFORM=linuxfb or EGL_DISPLAY=linuxfb corresponding to the Wayland compositor can be set in the EGL component. This allows the EGL component to establish a contextual relationship, i.e., a binding relationship, between the Wayland compositor and the simulated OpenGL ES based on the environment variable. When the simulated OpenGL ES component performs composite rendering on multiple Wayland application windows, it can use this contextual relationship to write the composite rendering results into a frame buffer component, such as LinuxFB, for ultimate display on the display screen of the terminal device.

[0053] Therefore, based on the above-mentioned Wayland window management system without GPU support, Wayland applications do not need to be adjusted, and terminal devices without GPU can still perform rendering operations and composite rendering operations, and display the final composite rendering results on hardware devices such as screens.

[0054] See also Figure 3 The embodiment of the present application provides a display method based on the Wayland protocol without GPU support. Based on the above-mentioned Wayland window management system without GPU support, it can be applied to terminal devices, etc. The method includes:

[0055] S310: When a rendering instruction sent by a Wayland application is received, the CPU is called to perform a rendering operation, and the obtained rendering result is cached in a first cache space.

[0056] Among them, the terminal device includes: simulated OpenGLES components and related components, multiple Wayland applications, Wayland synthesizer, display screen, etc.

[0057] Specifically, when the simulated OpenGLES component on the terminal device receives a rendering instruction from a Wayland application on the terminal device, it calls the CPU to perform a rendering operation, obtaining a rendering result corresponding to the Wayland application; the rendering result is then cached in shared memory, where the shared memory is created for the Wayland application by the terminal device's operating system based on the Wayland protocol. Each Wayland application is configured with corresponding shared memory, in which the display content of the Wayland application, which can be the rendering result, is cached.

[0058] In a possible implementation, after obtaining the rendering result, the following is further included:

[0059] An update message is sent to the synthesis component; in response to the update message, the synthesis component sends a synthesis instruction.

[0060] Specifically, the synthesis component may be a Wayland synthesizer, and an update message is sent to the Wayland synthesizer through the EGL component; after receiving the update message, the Wayland synthesizer sends a synthesis instruction to the simulated OpenGL ES component.

[0061] S320: When a synthesis instruction for a rendering result is received, the CPU is called to execute a synthesis rendering operation corresponding to the synthesis instruction, and the obtained synthesis rendering result is cached in a second cache space.

[0062] Specifically, when the simulated OpenGLES component receives a synthesis instruction for a rendering result from the Wayland synthesizer, the CPU is called to execute a synthesis rendering operation corresponding to the synthesis instruction.

[0063] The embodiment of the present application provides a display method based on the Wayland protocol without GPU support, which is based on a simulated OpenGL component or other related or similar components and has the function of scheduling CPU resources compared to the existing OpenGL component. After the simulated OpenGL component receives a rendering instruction or a synthesis instruction, it calls the CPU to perform the corresponding operation and caches the result of the operation in a preset space. Since the graphics processing capability provided by the GPU not only includes how to perform image processing operations, but also includes caching processing results, the above-mentioned technical means, in the absence of a GPU, will hand over the image processing operations including rendering operations and synthesis rendering operations to the CPU for processing, and provide preset cache spaces for caching the processing results, and finally display them. Therefore, the method provided by the present application can support a window management system based on the Wayland protocol without a GPU, and no modifications are required at the Wayland application level.

[0064] The present application also provides a possible implementation method, wherein the method further includes:

[0065] When initializing a Wayland application, the Wayland application is bound to the first component; or, when initializing a Wayland synthesizer, the Wayland synthesizer is bound to the first component.

[0066] The first component may be a simulated OpenGLES component or other related or similar components.

[0067] Specifically, when initializing a Wayland application, configure the environment variable EGL_PLATFORM=wayland or EGL_DISPLAY=wayland. Based on the configured environment variable EGL_COMPONENT, a binding relationship is established between the Wayland application and the simulated OpenGL ES component. When initializing a Wayland compositor, configure the environment variable EGL_PLATFORM=linuxfb or EGL_DISPLAY=linuxfb. Based on the configured environment variable EGL_COMPONENT, a binding relationship is established between the Wayland compositor and the simulated OpenGL ES component.

[0068] Based on the created binding relationship, Wayland applications can send rendering instructions to the simulated OpenGLES components, and Wayland compositors can send composite rendering instructions to the simulated OpenGLES components.

[0069] See also Figure 4 , the embodiment of the present application further provides a display device based on the Wayland protocol without GPU support, the device 400 comprising:

[0070] The first processing module 410 is configured to, upon receiving a rendering instruction sent by a Wayland application, call the CPU to perform a rendering operation and cache the obtained rendering result in a first cache space;

[0071] The second processing module 420 is configured to, upon receiving a composition instruction for a rendering result, call the CPU to execute a composition rendering operation corresponding to the composition instruction, and cache the obtained composition rendering result in a second cache space.

[0072] In one possible implementation, upon receiving a rendering instruction sent by a Wayland application, the first processing module 410 calls the CPU to perform a rendering operation and caches the obtained rendering result in the first cache space, specifically for:

[0073] When receiving the rendering instruction sent by the Wayland application, the CPU is called to perform the rendering operation and obtain the rendering result;

[0074] Cache the rendering results in shared memory, where the shared memory corresponds to the Wayland application.

[0075] In a possible implementation, after obtaining the rendering result, the following is further included:

[0076] Send update messages to the Wayland compositor;

[0077] Composition instructions are sent by the Wayland compositor in response to the update message.

[0078] In a possible implementation, the second processing module 420 caches the obtained composite rendering result in the second cache space, specifically for:

[0079] The composite rendering result is cached in a frame buffer component, wherein the frame buffer component is a cache space in the system kernel layer.

[0080] In one possible implementation, the apparatus 400 further includes a binding module 430, specifically configured to:

[0081] When initializing a Wayland application, the Wayland application is bound to the first component; or, when initializing a Wayland synthesizer, the Wayland synthesizer is bound to the first component.

[0082] In an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory. The processor executes the above-mentioned computer program to implement the steps of a display method based on the Wayland protocol without GPU support shown in the above-mentioned embodiment of the present application. Compared with the related art, it can achieve: supporting a window management system based on the Wayland protocol without a GPU, and no modification is required at the Wayland application level.

[0083] In an alternative embodiment, an electronic device is provided, such as Figure 5 As shown, Figure 5 The electronic device 5000 shown includes: a processor 5001 and a memory 5003. The processor 5001 and the memory 5003 are connected, for example, via a bus 5002. Optionally, the electronic device 5000 may further include a transceiver 5004, which may be used for data exchange between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the number of transceivers 5004 is not limited to one, and the structure of the electronic device 5000 does not constitute a limitation on the embodiments of the present application.

[0084] Processor 5001 can be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 5001 can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0085] The bus 5002 may include a path for transmitting information between the above components. The bus 5002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 5002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one thick line is used in the diagram, but this does not mean that there is only one bus or one type of bus.

[0086] The memory 5003 can be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation here.

[0087] The memory 5003 is used to store the computer program for executing the embodiments of the present application, and the execution is controlled by the processor 5001. The processor 5001 is used to execute the computer program stored in the memory 5003 to implement the steps shown in the above method embodiments.

[0088] Electronic devices include but are not limited to computers and mobile phones.

[0089] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented.

[0090] An embodiment of the present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the aforementioned method embodiment when executed by a processor.

[0091] The terms "first," "second," "third," "fourth," "1," "2," and the like (if any) in the specification and claims of this application and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequential sequence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the application described herein can be implemented in an order other than that shown or described in the drawings.

[0092] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the order of implementation of these steps is not limited to the order indicated by the arrows. Unless otherwise clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart can include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage in these sub-steps or stages can also be executed at different times respectively. Under different scenarios at the execution time, the execution order of these sub-steps or stages can be flexibly configured according to demand, and the embodiment of the present application does not limit this.

[0093] The above description is only an optional implementation method for some implementation scenarios of this application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the solution of this application, the use of other similar implementation methods based on the technical ideas of this application also falls within the protection scope of the embodiments of this application.

Claims

1. A display method based on the Wayland protocol without GPU support, characterized in that: The method is applied to a terminal, the terminal including: a Wayland application, a simulated OpenGL ES component, and a Wayland synthesizer, and the method includes: When the simulated OpenGL ES component receives the rendering instruction sent by the Wayland application, it calls the CPU to perform a rendering operation, and caches the obtained rendering result corresponding to the Wayland application in the first cache space; An update message is sent to the Wayland compositor through the EGL component; the Wayland compositor sends a synthesis instruction for the rendering result to the simulated OpenGL ES component in response to the update message; the simulated OpenGL ES component calls the CPU to perform a synthesis rendering operation corresponding to the synthesis instruction, and caches the obtained synthesis rendering result in a second cache space.

2. The method according to claim 1, characterized in that When the simulated OpenGL ES component receives a rendering instruction sent by the Wayland application, it calls the CPU to perform a rendering operation and caches the obtained rendering result in the first cache space, including: When receiving a rendering instruction sent by the Wayland application, calling the CPU to perform a rendering operation to obtain a rendering result; The rendering result is cached in a shared memory, wherein the shared memory corresponds to the Wayland application.

3. The method according to claim 1, characterized in that The step of caching the obtained composite rendering result in the second cache space includes: The composite rendering result is cached in a frame buffer component for display.

4. The method according to claim 1, wherein The method further comprises: When initializing the Wayland application, binding the Wayland application to the simulated OpenGL ES component; or, When initializing the Wayland compositor, the Wayland compositor is bound to the simulated OpenGL ES component.

5. A display device based on the Wayland protocol without GPU support, characterized in that: The device is applied to a terminal, the terminal including: a Wayland application, a simulated OpenGL ES component, and a Wayland synthesizer, and the device includes: a first processing module configured to, when the simulated OpenGL ES component receives a rendering instruction sent by the Wayland application, call a CPU to perform a rendering operation, and cache the obtained rendering result corresponding to the Wayland application in a first cache space; The second processing module is configured to send an update message to the Wayland compositor via the EGL component; in response to the update message, the Wayland compositor sends a synthesis instruction for the rendering result to the simulated OpenGL ES component; the simulated OpenGL ES component calls the CPU to perform a synthesis rendering operation corresponding to the synthesis instruction, and caches the obtained synthesis rendering result in the second cache space.

6. The device according to claim 5, characterized in that When the simulated OpenGLES component receives the rendering instruction sent by the Wayland application, the first processing module calls the CPU to perform a rendering operation and caches the obtained rendering result in the first cache space, specifically for: When the simulated OpenGL ES component receives the rendering instruction sent by the Wayland application, it calls the CPU to perform a rendering operation to obtain a rendering result; The rendering result is cached in a shared memory, wherein the shared memory corresponds to the Wayland application.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 4.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

9. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Graphic processing method, graphic processing device and terminal device

    CN103268620A

  • Window image display method and device and storage medium

    CN113448662A