Cross-process image drawing method and device, equipment and medium

By establishing a shared buffer in external storage and transferring image data to the image processor for rendering, the memory consumption problem of terminal devices when rendering high-resolution images is solved, improving system stability and user experience.

CN115512016BActive Publication Date: 2026-05-12GUANGZHOU FANGGUI INFORMATION TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU FANGGUI INFORMATION TECHNOLOGY CO LTD
Filing Date
2022-09-27
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

Existing terminal devices consume a large amount of RAM when rendering high-resolution images or multi-image animation effects, leading to system instability, potential OutOfMemory (OOM) issues, and impacting CPU efficiency and user experience.

Method used

By establishing a shared buffer in external memory to store the image data to be drawn and pushing it to the image processor for drawing, the dependence on the central processing unit and running memory is reduced, and a cross-process image drawing method is adopted.

Benefits of technology

It effectively saves RAM and CPU load, prevents memory overflow, ensures system stability and user experience, and optimizes the animation effects rendering process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115512016B_ABST
    Figure CN115512016B_ABST
Patent Text Reader

Abstract

The application discloses a cross-process image drawing method and device, equipment and medium, and the method comprises the following steps: in response to an image drawing event acting on a first image drawing process executed by a central processing unit, obtaining a target handle corresponding to a to-be-drawn image of the image drawing event; based on the target handle, generating a shared buffer of to-be-drawn image data, and establishing an address mapping between a memory address of the to-be-drawn image in the first image drawing process and a disk address in the shared buffer; based on the memory address, reading image data of the to-be-drawn image in the first image drawing process, and storing the image data to the disk address in the shared buffer; after the to-be-drawn image is completely stored to the shared buffer, the to-be-drawn image is pushed to a second image drawing process executed by an image processor, and the second image drawing process is driven to draw the to-be-drawn image. The application can reduce the image drawing pressure of the central processing unit and save the running memory, so as to improve the stability of the system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of special effects for live streaming, and in particular to a cross-process image rendering method. It also relates to the corresponding apparatus, equipment, and non-volatile storage medium for this method. Background Technology

[0002] When rendering animation effects for output display, existing terminal devices typically use advanced graphics engines such as Core Graphics, executed by the device's central processing unit, for graphics rendering. For example, advanced graphics engines like Core Graphics are used to render animation effects in live streaming rooms to enhance the live streaming atmosphere. However, if the advanced graphics engine needs to render high-resolution images or animation effects that render a large number of images, such as the high-definition, high-frame-rate gift animation effects in live streaming rooms which usually have a large number of high-resolution images, rendering will consume a large amount of the terminal device's RAM, affecting the stability of the operating system. Furthermore, instantly requesting a large amount of RAM to cache the images to be rendered may cause RAM overflow and lead to an OutOfMemoryError (OOM) problem, forcibly closing the image rendering process and interrupting the animation effect rendering, causing the application to crash, seriously affecting the user experience.

[0003] In addition to executing advanced graphics engines such as Core Graphics for graphics rendering, the central processing unit (CPU) in the device also needs to execute other processes to ensure the operation of applications and the running system. The massive number of processes puts a significant burden on the CPU, affecting its overall execution efficiency and response speed, and may even cause problems such as CPU overheating and system lag.

[0004] In view of the problems existing in the creation of animation special effects images, the applicant has made corresponding explorations in order to solve these problems. Summary of the Invention

[0005] The purpose of this application is to provide a cross-process image drawing method to meet user needs, and also relates to the corresponding apparatus, device, non-volatile storage medium and computer program product.

[0006] To achieve the objectives of this application, the following technical solution is adopted:

[0007] A cross-process image rendering method proposed for the purposes of this application includes the following steps:

[0008] In response to an image drawing event acting on a first image drawing process, the target handle corresponding to the image to be drawn in the image drawing event is obtained, wherein the first image drawing process is executed by a central processing unit;

[0009] Based on the target handle, a shared buffer for the image to be drawn is generated, and an address mapping is established between the memory address of the image to be drawn and the disk address in the shared buffer during the first image drawing process.

[0010] Based on the memory address, read the image data of the image to be drawn in the first image drawing process, and store the image data in the disk address in the shared buffer;

[0011] After the image to be drawn is completely stored in the shared buffer, the image to be drawn is pushed to the second image drawing process, which drives the second image drawing process to draw the image to be drawn. The second image drawing process is executed by the image processor.

[0012] In a further embodiment, the step of responding to an image drawing event acting on the first image drawing process includes the following steps:

[0013] In response to a virtual gift gifting event in the live stream, obtain the target gift identifier of the virtual gift gifting event;

[0014] Retrieve the animation effect control corresponding to the target gift identifier from the gift control library; the animation effect control contains the image to be drawn.

[0015] The image to be drawn, contained in the animation effect control, is pushed to the first image drawing process, triggering the image drawing event acting on the image to be drawn.

[0016] In a further embodiment, the step of generating a shared buffer for the image to be drawn based on the target handle, and establishing an address mapping between the memory address of the image to be drawn and the disk address in the shared buffer during the first image drawing process, includes the following steps:

[0017] Generate a shared buffer with the target handle;

[0018] Obtain the first memory address of the image to be drawn in the first image drawing process;

[0019] Establish an address mapping between the first memory address and the first disk address in the shared buffer.

[0020] In a further embodiment, the step of reading the image data of the image to be drawn in the first image drawing process based on the memory address and storing the image data in the disk address in the shared buffer includes the following steps:

[0021] Determine the memory address pointer of the image to be drawn acting on the first image drawing process, and determine the target memory address corresponding to the memory address pointer;

[0022] Based on the preset number of address reading steps, determine the ending memory address corresponding to the target memory address as the starting point;

[0023] Determine the memory address range between the target memory address and the end memory address, obtain the image data stored in the memory address range, and store the image data in the corresponding disk address in the shared buffer;

[0024] Adjust the memory address pointer based on the last memory address.

[0025] In a further embodiment, the step of completely storing the image to be drawn in the shared buffer and then pushing the image to be drawn to the second image drawing process to drive the second image drawing process to draw the image to be drawn includes the following steps:

[0026] Based on each disk address in the shared buffer, obtain the image to be drawn, which is composed of the image data stored in each disk address;

[0027] The image to be drawn is pushed to the second image drawing process, which then drives the second image drawing process to draw the image to be drawn according to a preset image filter algorithm;

[0028] Obtain the vector image output by the second image drawing process.

[0029] In a further embodiment, after the step of completely storing the image to be drawn in the shared buffer, pushing the image to be drawn to the second image drawing process, and driving the second image drawing process to draw the image to be drawn, the following steps are included:

[0030] Obtain the special effects image generated corresponding to the image to be drawn by the second image drawing process;

[0031] The image callback method of the first image drawing process is invoked to send the special effects image back to the first image drawing process;

[0032] The first image drawing process is driven to output the special effects image to the animation effects control for display.

[0033] In a further embodiment, after the step of completely storing the image to be drawn in the shared buffer, pushing the image to be drawn to the second image drawing process, and driving the second image drawing process to draw the image to be drawn, the following steps are included:

[0034] Respond to the image display completion event applied to the animation effect control, and obtain the target handle corresponding to the image display completion event;

[0035] Identify the target shared buffer corresponding to the target handle and remove the target shared buffer.

[0036] A cross-process image rendering apparatus proposed for the purposes of this application includes:

[0037] A drawing event response module is used to respond to an image drawing event acting on the first image drawing process and obtain the target handle corresponding to the image to be drawn in the image drawing event, wherein the first image drawing process is executed by the central processing unit;

[0038] A buffer generation module is used to generate a shared buffer for the image to be drawn based on the target handle, and to establish an address mapping between the memory address of the image to be drawn and the disk address in the shared buffer during the first image drawing process.

[0039] An image data buffer module is used to read the image data of the image to be drawn in the first image drawing process based on the memory address, and store the image data in the disk address in the shared buffer;

[0040] An image sharing drawing module is used to completely store the image to be drawn into the shared buffer, and then push the image to be drawn to the second image drawing process to drive the second image drawing process to draw the image to be drawn, wherein the second image drawing process is executed by an image processor.

[0041] In a further embodiment, the drawing event response module includes:

[0042] The gift-giving event response submodule is used to respond to virtual gift-giving events that occur in the live stream room and to obtain the target gift identifier of the virtual gift-giving event.

[0043] The special effects control query submodule is used to query the animation special effects control corresponding to the target gift icon from the gift control library. The animation special effects control contains an image to be drawn.

[0044] The drawing event triggering submodule is used to push the image to be drawn contained in the animation effect control to the first image drawing process, and trigger the image drawing event acting on the image to be drawn.

[0045] In a further embodiment, the buffer generation module includes:

[0046] A buffer generation submodule is used to generate a shared buffer with the target handle;

[0047] The first address acquisition submodule is used to acquire the first memory address of the image to be drawn in the first image drawing process;

[0048] The address mapping processing submodule is used to establish an address mapping between the first memory address and the first disk address in the shared buffer.

[0049] In a further embodiment, the image data buffer module includes:

[0050] The memory address determination submodule is used to determine the memory address pointer of the image to be drawn in the first image drawing process, and to determine the target memory address corresponding to the memory address pointer;

[0051] The end address determination submodule is used to determine the end memory address corresponding to the target memory address as the starting point, based on a preset number of address reading steps.

[0052] The image data storage submodule is used to determine the memory address range between the target memory address and the end memory address, obtain the image data stored in the memory address range, and store the image data in the corresponding disk address in the shared buffer.

[0053] The address pointer adjustment submodule is used to adjust the memory address pointer based on the last memory address.

[0054] In a further embodiment, the image sharing drawing module includes:

[0055] The image to be drawn submodule is used to obtain the image to be drawn composed of image data stored in each of the disk addresses in the shared buffer.

[0056] The image to be drawn submodule is used to push the image to be drawn to the second image drawing process and drive the second image drawing process to draw the image to be drawn according to a preset image filter algorithm;

[0057] The vector image acquisition submodule is used to acquire the vector image output by the second image drawing process.

[0058] To address the aforementioned technical problems, this application also provides a computer device, including a memory and a processor. The memory stores computer-readable instructions, which, when executed by the processor, cause the processor to perform the steps of the cross-process image rendering method described above.

[0059] To address the aforementioned technical problems, this application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the cross-process image drawing method described above.

[0060] To address the aforementioned technical problems, this application also provides a computer program product, including a computer program and computer instructions. When the computer program and computer instructions are executed by a processor, the processor performs the steps of the cross-process image drawing method described above.

[0061] Compared with existing technologies, the advantages of this application are as follows:

[0062] This application saves the runtime memory occupied by the image data to be drawn by establishing a shared buffer located in external memory. The shared buffer is created based on the handle of the image to be drawn, and the image data of the image to be drawn is stored in the shared buffer for subsequent cross-process drawing processing. There is no need to request memory from the terminal device's runtime memory to cache the image data to be drawn. Instead, the image data to be drawn is stored in external memory. Even when dealing with high-resolution images with a large amount of data, it will not occupy runtime memory for caching. This ensures that runtime memory can be used to process other system tasks and processes, ensures the operational stability of the terminal device's operating system, prevents memory overflow problems such as OOM, and ensures that the drawing process and application can run stably, thereby improving the user interface experience when drawing animation effects.

[0063] Secondly, this application can perform cross-process image drawing processing. By caching the image data that should be processed by the central processing unit into a shared buffer, the image data is transferred to the image drawing process executed by the image processor for drawing processing, forming hardware linkage of the terminal device. This can effectively save the operating pressure of the central processing unit, prevent the terminal device from causing system lag due to central processing unit overload, optimize the drawing process of animation effects, and improve the user experience. Attached Figure Description

[0064] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0065] Figure 1 A typical network deployment architecture diagram related to the implementation of the technical solution of this application;

[0066] Figure 2 This is a flowchart illustrating a typical embodiment of the cross-process image rendering method of this application;

[0067] Figure 3This is a schematic diagram of the live streaming room interface displaying the virtual gift control in this application;

[0068] Figure 4 This is a flowchart illustrating a specific implementation method for triggering an image drawing event in this application;

[0069] Figure 5 This is a flowchart illustrating the specific implementation of generating a shared buffer and mapping memory addresses and disk addresses in this application;

[0070] Figure 6 This is a flowchart illustrating the specific implementation method of obtaining image data stored in a memory address and storing it in the corresponding disk address in a shared buffer, as described in this application.

[0071] Figure 7 This is a flowchart illustrating a specific implementation method in this application for pushing an image to be drawn to a second image drawing process for drawing processing.

[0072] Figure 8 This is a schematic diagram of the live streaming interface displaying animated special effects controls with special effects images in this application;

[0073] Figure 9 This is a flowchart illustrating a specific implementation method in this application for transmitting special effects images drawn in the second image drawing process back to the first image drawing process for output display.

[0074] Figure 10 This is a flowchart illustrating a specific implementation method for removing a shared buffer from which image output has been completed in this application.

[0075] Figure 11 A schematic block diagram of a typical embodiment of the cross-process image rendering apparatus of this application;

[0076] Figure 12 This is a basic structural block diagram of a computer device according to an embodiment of this application. Detailed Implementation

[0077] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0078] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0079] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0080] Those skilled in the art will understand that the terms "client," "terminal," and "terminal device" as used herein include both devices that receive wireless signals, devices that only possess wireless signal receiver capabilities without transmission capabilities, and devices with receiving and transmitting hardware, devices that have receiving and transmitting hardware capable of bidirectional communication over a bidirectional communication link. Such devices may include: cellular or other communication devices such as personal computers or tablets, having single-line displays, multi-line displays, or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service) that can combine voice, data processing, fax, and / or data communication capabilities; PDA (Personal Digital Assistant) that may include a radio frequency receiver, pager, internet / intranet access, web browser, notepad, calendar, and / or GPS (Global Positioning System) receiver; and traditional laptops and / or handheld computers or other devices that have and / or include radio frequency receivers. As used herein, "client," "terminal," and "terminal device" can be portable, transportable, installed in a means of transportation (air, sea, and / or land), or suitable and / or configured to operate locally and / or in a distributed manner, operating in any other location on Earth and / or in space. "Client," "terminal," and "terminal device" as used herein can also be a communication terminal, an internet access terminal, or a music / video playback terminal, such as a PDA, a MID (Mobile Internet Device), and / or a mobile phone with music / video playback capabilities, or a smart TV, set-top box, etc.

[0081] The hardware referred to by the names "server," "client," and "work node" in this application is essentially an electronic device with the equivalent capabilities of a personal computer. It is a hardware device with the necessary components revealed by the von Neumann architecture, such as a central processing unit (including an arithmetic logic unit and a control unit), memory, input devices, and output devices. The computer program is stored in its memory, and the central processing unit loads the program stored in the secondary storage into the main memory to run it, executes the instructions in the program, and interacts with the input and output devices to complete specific functions.

[0082] It should be noted that the concept of "server" used in this application can also be extended to the case of server clusters. Based on the network deployment principles understood by those skilled in the art, the servers should be logically divided. Physically, these servers can be independent of each other but accessible through interfaces, or they can be integrated into a single physical computer or a computer cluster. Those skilled in the art should understand this flexibility and should not use it to constrain the implementation of the network deployment method in this application.

[0083] Please see Figure 1 The hardware infrastructure required for implementing the technical solutions of this application can be deployed according to the architecture shown in the figure. The server 80 mentioned in this application is deployed in the cloud and acts as an online server. It can further connect to relevant data servers and other servers providing related support, thereby forming a logically related service cluster to provide services to relevant terminal devices such as the smartphone 81 and personal computer 82 shown in the figure, or third-party servers (not shown). Both the smartphone and personal computer can access the Internet through known network access methods and establish a data communication link with the cloud server 80 to run terminal applications related to the services provided by the server.

[0084] For servers, the application is usually built as a service process, with corresponding program interfaces exposed for remote calls by applications running on various terminal devices. The relevant technical solutions in this application that are suitable for running on servers can be implemented in servers in this way.

[0085] The application mentioned refers to an application running on a server or terminal device. This application implements the relevant technical solutions of this application in a programmed manner. Its program code can be stored in a non-volatile storage medium that can be recognized by a computer in the form of computer-executable instructions, and is loaded into memory by the central processing unit for execution. The relevant device of this application is constructed by the operation of the application on the computer.

[0086] For servers, the application is usually built as a service process, with corresponding program interfaces exposed for remote calls by applications running on various terminal devices. The relevant technical solutions in this application that are suitable for running on servers can be implemented in servers in this way.

[0087] Those skilled in the art will understand that although the various methods in this application are described based on the same concept and thus present commonality among them, they can be performed independently unless otherwise specified. Similarly, the various embodiments disclosed in this application are all based on the same inventive concept; therefore, concepts expressed in the same way, as well as concepts that are appropriately changed for convenience but are expressed differently, should be understood equivalently.

[0088] Please see Figure 2 The present application discloses a cross-process image rendering method, which, in a typical embodiment, includes the following steps:

[0089] Step S11: In response to an image drawing event acting on the first image drawing process, obtain the target handle corresponding to the image to be drawn in the image drawing event, wherein the first image drawing process is executed by the central processing unit.

[0090] The first image drawing process is executed by the central processing unit of the terminal device. When the central processing unit draws the image to be drawn using an advanced graphics engine such as Core Graphics, it will generate the first image drawing process to draw the image to be drawn. At this time, the image drawing event pointing to the image to be drawn will also be triggered.

[0091] The central processing unit mentioned refers to the CPU processor in the terminal device.

[0092] The image drawing event is generally triggered when the central processing unit (CPU) executes the corresponding image drawing process to draw the image to be drawn. For example, in a live streaming scenario, when it is necessary to output and display animation effects controls such as virtual gifts or live events on the live streaming interface, the CPU will be driven to draw the image to be drawn by the animation effects control through an advanced graphics engine such as Core Graphics, so as to output the animation effects control to the live streaming interface for display. Specifically, taking the animation effects of virtual gifts as an example, in response to the virtual gift giving event in the live streaming room, the target gift identifier of the virtual gift giving event is obtained, so as to query the animation effects control corresponding to the target gift identifier from the gift control library. The animation effects control contains the image to be drawn, and then the image to be drawn contained in the animation effects control is pushed to the first image drawing process, triggering the image drawing event acting on the image to be drawn.

[0093] The image to be drawn generally refers to the special effect image frame of the animation effect control. It can be understood that the animation effect output by the animation effect control in the interface is generally formed by playing multiple image frames, and each image frame needs to be drawn by the central processing unit through the first image drawing process to be output to the interface for display. Each image frame is the image to be drawn for the first image drawing process.

[0094] The handle is an identifier used to identify an object or item, and can be used to describe windows, files, etc. Since the image to be drawn is stored in the running memory or virtual memory of the first image drawing process, and the memory address of the image data of the image to be drawn may change in real time, after the change, someone needs to record and manage the change. Therefore, the system uses a handle to record the change of data address. In program design, a handle is a special kind of smart pointer. When an application needs to reference a memory block or object managed by other systems (such as databases or operating systems), it must use a handle. In short, the handle corresponding to the image to be drawn can be understood as the image feature identifier of the image to be drawn.

[0095] Step S12: Based on the target handle, generate a shared buffer for the image to be drawn, and establish an address mapping between the memory address of the image to be drawn and the disk address in the shared buffer during the first image drawing process.

[0096] After obtaining the target handle corresponding to the image to be drawn in the first image drawing process, a shared buffer corresponding to the image to be drawn is generated based on the target handle. The shared buffer operates on the external storage of the terminal device. The external storage refers to storage other than the terminal device's RAM and CPU cache. Such storage generally retains data even after power failure. Common external storage devices include hard disks, floppy disks, optical disks, and USB flash drives. By generating the shared buffer for the image to be drawn, the image to be drawn is stored in the external storage, and then pushed to the second image drawing process. Traditional cross-process data transfer usually requires storing data in the terminal device's RAM or CPU cache for data transfer. This method generates the shared buffer in the terminal device to store the image to be drawn that needs to be transferred across processes, thereby storing the image to be drawn in the terminal device's external storage, saving the terminal device's RAM and CPU cache, and preventing memory overflow and OOM problems from interrupting the drawing process of the image to be drawn due to the image occupying the terminal device's RAM and CPU cache.

[0097] The memory address refers to the address of each storage space in the running memory of the terminal device. The first image drawing process is located in the running memory of the terminal device. Correspondingly, after the first image drawing process obtains the image to be drawn, the image to be drawn will also be stored in the running memory. Multiple image data forming the image to be drawn will be stored in each storage space of the running memory. Then, each image data corresponds to the memory address of its storage space.

[0098] The disk address refers to the address of each storage space in the external memory of the terminal device. Correspondingly, the shared buffer is located in the external memory. After obtaining the image data from the storage space of the running memory that stores the image data of the image to be drawn, the image data needs to be stored in the storage space corresponding to the disk address in the shared buffer, so as to store the image to be drawn in the external memory of the terminal device.

[0099] After generating the shared buffer for storing the image to be drawn based on the target handle, and establishing an address mapping between the memory address of the image to be drawn in the first image drawing process and the disk address in the shared buffer, so that after subsequently obtaining the image data of the image to be drawn stored in the storage space corresponding to each memory address, these image data can be stored in the storage space of the disk address corresponding to each memory address in the shared buffer, and then the image to be drawn can be stored in the external storage of the terminal device; specifically, firstly, the first memory address of the image to be drawn acting on the first image drawing process is obtained, so as to establish the first The address mapping between the memory address and the first disk address in the shared buffer is used to obtain the image data of the image to be drawn from the storage space of the first memory address when transmitting the image data of the image to be drawn in the subsequent transmission. The image data is then stored in the storage space of the first disk address in the shared buffer. The memory address storing the image data of the image to be drawn and the disk address used to store the image data are adjusted by the address pointer to form a data stream that stores the image data of the image to be drawn in the running memory into the shared buffer. For the specific implementation of image data storage, please refer to the following steps. This step will not be described in detail here.

[0100] Step S13: Based on the memory address, read the image data of the image to be drawn in the first image drawing process, and store the image data in the disk address in the shared buffer.

[0101] After generating the shared buffer for storing the image to be drawn, and establishing the mapping between the memory address of the image to be drawn in the first image drawing process and the disk address of the shared buffer, the image data of the image to be drawn stored at each memory address is obtained, so as to store these image data in the corresponding disk address in the shared buffer.

[0102] After establishing the mapping between the memory address of the image to be drawn in the first image drawing process and the disk address of the shared buffer, each memory address is traversed to obtain the image data stored at those memory addresses, and the image data is stored in the corresponding disk address in the shared buffer. While traversing each memory address storing the image data of the image to be drawn, the address pointer is adjusted to mark the memory address to be read, and the number of memory addresses to be read each time is set according to a preset address reading step count. Specifically, the memory address pointer of the image to be drawn acting on the first image drawing process is determined, the target memory address corresponding to that memory address pointer is determined, and the target memory address is determined according to the preset address reading step count. The target memory address is defined as the end memory address corresponding to the starting address. Then, the memory address range between the target memory address and the end memory address is determined. Image data stored in the memory address range is obtained, and the image data is stored in the corresponding disk address in the shared buffer. The memory address pointer is adjusted based on the end memory address. This process is repeated, using the memory address pointer to determine the memory address range, obtaining each image data and storing it in the corresponding disk address in the shared buffer. The image data of the image to be drawn is obtained from the first image drawing process and stored in the shared buffer until all the image data of the image to be drawn is stored in the shared buffer. Finally, the image to be drawn is completely stored in the shared buffer.

[0103] Step S14: After completely storing the image to be drawn in the shared buffer, the image to be drawn is pushed to the second image drawing process, driving the second image drawing process to draw the image to be drawn. The second image drawing process is executed by the image processor.

[0104] When all the image data of the image to be drawn is stored in the shared buffer, it indicates that the image to be drawn has been stored in the shared buffer. At this time, the image to be drawn stored in the shared buffer is pushed to the second drawing process to drive the second image drawing process to draw the image to be drawn.

[0105] The second image rendering process is executed by the image processor (GPU) of the terminal device. This second image rendering process is executed by the GPU of the terminal device through a high-level graphics engine such as OpenGL. After the image to be rendered is pushed to the second image rendering process, it is then executed by the GPU of the terminal device to render the image. It can be seen that by transferring the image to be rendered by the first image rendering process, which should have been executed by the central processing unit (CPU), to the second image rendering process executed by the GPU, hardware integration within the terminal device is achieved. Tasks that should have been executed by the CPU are handled by the GPU, reducing the CPU's execution load and allowing the CPU to handle other tasks within the terminal device, thereby ensuring the system stability of the terminal device.

[0106] Based on the disk addresses in the shared buffer, after obtaining the image to be drawn composed of the image data stored in each disk address, the image to be drawn is pushed to the second image drawing process. After obtaining the image to be drawn, the second image drawing process will draw the image to be drawn according to the preset image filter algorithm, so as to draw the image to be drawn into a special effect image with image filter.

[0107] After obtaining the special effect image drawn by the second image drawing process based on the image to be drawn, it is generally necessary to call back the special effect image to the first image drawing process so that the first image drawing process can output and display the special effect image. Specifically, after obtaining the special effect image generated corresponding to the image to be drawn by the second image drawing process, the image callback method of the first image drawing process will be called to send the special effect image back to the first image drawing process so as to drive the first image drawing process to output the special effect image to the animation effect control for display.

[0108] After the image to be drawn stored in the shared buffer is pushed to the second image drawing process, when the second image drawing process completes the drawing process of the image to be drawn and completes the output display, the shared buffer and the image to be drawn stored therein will be removed. Specifically, in response to the image display completion event acting on the animation effect control, the target handle corresponding to the image display completion event is obtained, the target shared buffer corresponding to the target handle is determined, and then the target shared buffer is removed.

[0109] As can be seen from the typical implementation of this method, this method saves the running memory occupied by the image data to be drawn by establishing a shared buffer located in the external memory. The shared buffer is created based on the handle of the image to be drawn, so that the image data of the image to be drawn is stored in the shared buffer for subsequent cross-process drawing processing. There is no need to request memory from the running memory of the terminal device to cache the image data to be drawn. Instead, the image data to be drawn is stored in the external memory. Even when dealing with high-resolution images with a large amount of data, the running memory will not be occupied for caching. This ensures that the running memory can be used to process other tasks and processes of the system, ensures the running stability of the terminal device's operating system, prevents memory overflow problems such as OOM, and ensures that the drawing process and application can run stably, thereby improving the interface appearance for users to draw animation effects.

[0110] Secondly, this method can perform cross-process image drawing processing. By caching the image data that should be processed by the central processing unit into a shared buffer, the image data is transferred to the image drawing process executed by the image processor for drawing processing, forming hardware linkage of the terminal device. This can effectively save the operating pressure of the central processing unit, prevent the terminal device from being overloaded by the central processing unit and cause system lag, optimize the drawing process of animation effects, and improve the user experience.

[0111] The above typical embodiments and their variations fully disclose the implementation scheme of the cross-process image rendering method of this application. However, various variations of the method can still be derived by changing and expanding some technical means. Other embodiments are briefly described below:

[0112] In one embodiment, please refer to Figure 3 and Figure 4 The step of responding to an image drawing event acting on the first image drawing process includes the following steps:

[0113] Step S111: In response to a virtual gift gifting event in the live stream, obtain the target gift identifier of the virtual gift gifting event.

[0114] The virtual gift-giving event is generally triggered by a viewer in the live stream selecting a virtual gift using the virtual gift-giving control. Please refer to [link / reference]. Figure 3 , Figure 3 The virtual gift control 301 in the live broadcast interface shows that viewers can select virtual gifts such as gift A, gift B or gift C through the virtual gift control 301 to trigger the virtual gift gifting event that acts on the selected virtual gift.

[0115] Upon responding to the virtual gift giving event, the gift identifier corresponding to the virtual gift giving event will be obtained. The gift identifier is used to represent the virtual gift selected by the viewer user.

[0116] Step S112: Query the animation effect control corresponding to the target gift identifier from the gift control library. The animation effect control contains the image to be drawn.

[0117] After obtaining the target gift identifier, the corresponding animation effect control will be retrieved from the gift control library. The gift control library stores multiple mapping relationship data composed of gift identifiers and animation effect controls.

[0118] The animation effects control contains one or more images to be drawn, so as to form animation effects by drawing one image to be drawn as an effect image and outputting it to the live broadcast interface, or by drawing multiple images to be drawn in an orderly manner to generate multiple effect images, and continuously outputting these effect images to the live broadcast interface to form animation effects.

[0119] Step S113: Push the image to be drawn contained in the animation effect control to the first image drawing process, triggering the image drawing event acting on the image to be drawn:

[0120] After obtaining the animation effect control corresponding to the target gift identifier, the image to be drawn contained in the animation effect control is pushed to the corresponding image drawing process to trigger the image drawing event acting on the image to be drawn, thereby establishing a shared buffer corresponding to the image to be drawn for image data storage, and pushing the image to be drawn to the second image drawing process for cross-process image drawing.

[0121] In this embodiment, the animation effects displayed in the live broadcast interface are generally the animation effects of virtual gifts. By determining the animation effect control corresponding to the virtual gift selected by the viewer in the live broadcast, an image drawing event is triggered to generate the image to be drawn contained in the animation effect control, and then the image to be drawn is stored in a shared buffer and processed across processes.

[0122] In one embodiment, please refer to Figure 5 The step of generating a shared buffer for the image to be drawn based on the target handle, and establishing an address mapping between the memory address of the image to be drawn and the disk address in the shared buffer during the first image drawing process, includes the following steps:

[0123] Step S121: Generate a shared buffer with the target handle:

[0124] After obtaining the target handle of the image to be drawn, a shared buffer with the target handle will be generated to indicate that the shared buffer is used only to store the image to be drawn.

[0125] Step S122: Obtain the first memory address of the image to be drawn in the first image drawing process:

[0126] The first memory address refers to the memory address in the running memory corresponding to the first image drawing process where the image data of the image to be drawn is stored first. The multiple image data that form the image to be drawn are generally stored in order in the memory addresses of the running memory corresponding to the first image drawing process. Therefore, the memory address of each image data that forms the image to be drawn can be located by obtaining the first memory address.

[0127] Step S123: Establish an address mapping between the first memory address and the first disk address in the shared buffer.

[0128] After obtaining the first memory address, an address mapping will be established between the first memory address and the first disk address in the shared buffer. This will allow the image data stored at the first memory address to be stored in the first disk address after the image data is subsequently obtained. The next memory address of the first memory address will also be mapped to the next disk address of the first disk address for corresponding storage of the image data.

[0129] In this embodiment, a shared buffer is established to store a specific image to be drawn, and an address mapping is established between the memory address of the image to be drawn and the disk address of the shared buffer. This allows the image data of the image to be drawn to be stored in the shared buffer, so that the image data stored at multiple consecutive disk addresses in the shared buffer can form the image to be drawn.

[0130] In one embodiment, please refer to Figure 6 The step of reading the image data of the image to be drawn in the first image drawing process based on the memory address and storing the image data in the disk address in the shared buffer includes the following steps:

[0131] Step S131: Determine the memory address pointer of the image to be drawn acting on the first image drawing process, and determine the target memory address corresponding to the memory address pointer:

[0132] The memory address pointer operates on the running memory where the first image drawing process is located. The memory address pointer marks the memory address in the running memory that is not currently being read, so as to obtain image data from the target memory address corresponding to the memory address pointer. It can be understood that the image data stored in the target memory address corresponding to the memory address pointer is not stored in the shared buffer.

[0133] Step S132: Based on the preset number of address reading steps, determine the ending memory address corresponding to the target memory address as the starting point:

[0134] The address reading steps are used to specify the number of memory addresses to be read, which can also be understood as the number of image data to be read. Based on the preset address reading steps, starting from the target memory address corresponding to the memory address pointer, the cumulative value of the target memory address and the number of steps represented by the address reading steps is calculated, and the memory address represented by the cumulative value is used as the end memory address.

[0135] Step S133: Determine the memory address range between the target memory address and the end memory address, obtain the image data stored in the memory address range, and store the image data in the corresponding disk address in the shared buffer.

[0136] After determining the end memory address, the memory address range between the target memory address and the end memory address will be determined. The memory address range refers to the range including the target memory address and the end memory address, as well as the memory address between the target memory address and the end memory address.

[0137] Obtain the image data stored at each memory address within the memory address range, and store these images at the corresponding disk addresses in the shared buffer.

[0138] Step S134: Adjust the memory address pointer based on the last memory address:

[0139] After storing the image data at each memory address in the memory address range into the corresponding disk address in the shared buffer, the memory address corresponding to the memory address pointer will be adjusted based on the last memory address. This memory address is generally the memory address following the last address.

[0140] In this embodiment, the image data to be drawn is located in the running memory but has not been transmitted, and the image data to be stored in the shared buffer is determined according to the preset address reading steps. The image data stored in the shared buffer is located in the corresponding disk address.

[0141] In one embodiment, please refer to Figure 7 The step of completely storing the image to be drawn into the shared buffer, and then pushing the image to be drawn to the second image drawing process to drive the second image drawing process to draw the image to be drawn includes the following steps:

[0142] Step S141: Based on each disk address in the shared buffer, obtain the image to be drawn composed of the image data stored in each disk address.

[0143] By traversing each disk address in the shared buffer, the image data stored at each disk address is obtained, and the image data is then combined into the image to be drawn.

[0144] Step S142: Push the image to be drawn to the second image drawing process, and drive the second image drawing process to draw the image to be drawn according to a preset image filter algorithm.

[0145] The image to be drawn is pushed to the second image drawing process, which will drive the second image drawing process to draw the image to be drawn according to a preset image filter algorithm. The image filter algorithm is set by the developer and is generally used to adjust the color (RGB) information of the image to be drawn to adjust the image color of the image to be drawn, or to perform image cropping and other algorithms on the image to be drawn.

[0146] Step S143: Obtain the vector image output by the second image drawing process:

[0147] The special effects image output by the second image drawing process is generally a vector image. A vector image refers to a graphic drawn based on geometric characteristics. A vector can be a point or a line. Vector graphics can only be generated by software, and the file occupies less internal space because this type of image file contains independent separate images that can be freely and without restriction recombine.

[0148] In this embodiment, the computational pressure on the central processing unit is reduced by pushing the graphics to be drawn stored in the shared buffer to the second drawing process executed by the graphics processor. The special effects image output by the second graphics drawing process is a vector image, thereby saving the storage space of the device.

[0149] In one embodiment, please refer to Figure 8 and Figure 9 After the step of completely storing the image to be drawn into the shared buffer, pushing the image to be drawn to the second image drawing process, and driving the second image drawing process to draw the image to be drawn, the following steps are included:

[0150] Step S15: Obtain the special effects image generated by the second image drawing process corresponding to the image to be drawn.

[0151] After the second image drawing process completes the generation of the corresponding special effect image from the image to be drawn, it will retrieve the special effect image from the second image drawing process to send the special effect image back to the first image drawing process for output display.

[0152] Step S16: Invoke the image callback method of the first image drawing process to send the special effects image back to the first image drawing process.

[0153] The image callback method is used to send back the special effect image corresponding to the image to be drawn that was previously drawn by the first image drawing process to the first image drawing process, that is, to send back the special effect image generated by the second image drawing process drawing the image to the first image drawing process.

[0154] Step S17: Drive the first image drawing process to output the special effects image to the animation effects control for display:

[0155] Please refer to Figure 8 After the special effects image is sent back to the first image drawing process, the first image drawing process outputs the special effects image to the animation effects control, which is located in the live streaming interface, such as... Figure 8 The animation effects control 801 shown outputs and displays the special effects image.

[0156] In this embodiment, the special effects image drawn by the second image drawing process is sent back to the first image drawing process for output display, so as to ensure that the special effects image can be output to the animation effects control for display, and the animation effects corresponding to the animation effects control can be fully displayed.

[0157] In one embodiment, please refer to Figure 10 After the step of completely storing the image to be drawn into the shared buffer, pushing the image to be drawn to the second image drawing process, and driving the second image drawing process to draw the image to be drawn, the following steps are included:

[0158] Step S15': In response to the image display completion event applied to the animation effect control, obtain the target handle corresponding to the image display completion event.

[0159] The image display completion event refers to the event triggered when any special effect image is displayed and then canceled in the animation special effect control. At this time, by responding to the image display completion event, the special effect image corresponding to the image display completion event is determined, so as to obtain the target handle corresponding to the image to be drawn corresponding to the special effect image.

[0160] Step S16': Determine the target shared buffer corresponding to the target handle, and remove the target shared buffer.

[0161] The target shared buffer corresponding to the target handle is identified, and the shared buffer and the image to be drawn stored therein are removed.

[0162] In this embodiment, the shared buffer storing the images to be drawn corresponding to the special effects images that have been displayed is removed to save storage space occupied by images that do not need to be drawn.

[0163] Furthermore, by functionalizing the various steps in the methods disclosed in the above embodiments, a cross-process image rendering apparatus of this application can be constructed. Following this approach, please refer to... Figure 11 In one typical embodiment, the device includes: a drawing event response module 11, configured to respond to an image drawing event acting on a first image drawing process and obtain a target handle corresponding to the image to be drawn in the image drawing event, wherein the first image drawing process is executed by a central processing unit; a buffer generation module 12, configured to generate a shared buffer for the image to be drawn based on the target handle and establish an address mapping between the memory address of the image to be drawn in the first image drawing process and the disk address in the shared buffer; an image data buffer module 13, configured to read the image data of the image to be drawn in the first image drawing process based on the memory address and store the image data in the disk address in the shared buffer; and an image shared drawing module 14, configured to push the image to be drawn to a second image drawing process after completely storing the image to be drawn in the shared buffer, and drive the second image drawing process to draw the image to be drawn, wherein the second image drawing process is executed by an image processor.

[0164] In one embodiment, the drawing event response module 11 includes: a gift-giving event response submodule, used to respond to a virtual gift-giving event acting on the live broadcast room and obtain the target gift identifier of the virtual gift-giving event; an effects control query submodule, used to query the animation effects control corresponding to the target gift identifier from the gift control library, wherein the animation effects control contains an image to be drawn; and a drawing event triggering submodule, used to push the image to be drawn contained in the animation effects control to the first image drawing process and trigger the image drawing event acting on the image to be drawn.

[0165] In one embodiment, the buffer generation module 12 includes: a buffer generation submodule for generating a shared buffer with the target handle; a first address acquisition submodule for acquiring the first memory address of the image to be drawn acting on the first image drawing process; and an address mapping processing submodule for establishing an address mapping between the first memory address and the first disk address in the shared buffer.

[0166] In one embodiment, the image data buffer module 13 includes: a memory address determination submodule, used to determine the memory address pointer of the image to be drawn acting on the first image drawing process, and determine the target memory address corresponding to the memory address pointer; an end address determination submodule, used to determine the end memory address corresponding to the target memory address as the address starting point according to a preset number of address reading steps; an image data storage submodule, used to determine the memory address range between the target memory address and the end memory address, obtain the image data stored in the memory address range, and store the image data in the corresponding disk address in the shared buffer; and an address pointer adjustment submodule, used to adjust the memory address pointer based on the end memory address.

[0167] In one embodiment, the image sharing drawing module 14 includes: a submodule for acquiring an image to be drawn, configured to acquire an image to be drawn composed of image data stored in each of the disk addresses in the shared buffer; a submodule for drawing an image to be drawn, configured to push the image to be drawn to the second image drawing process and drive the second image drawing process to draw the image to be drawn according to a preset image filter algorithm; and a submodule for acquiring a vector image output by the second image drawing process.

[0168] To address the aforementioned technical problems, embodiments of this application also provide a computer device for running a computer program implemented according to the cross-process image rendering method. Please refer to the following for details. Figure 12 , Figure 12 This is a basic structural block diagram of the computer device in this embodiment.

[0169] like Figure 12 The diagram shows the internal structure of a computer device. The computer device includes a processor, non-volatile storage medium, memory, and a network interface connected via a system bus. The non-volatile storage medium stores the operating system, database, and computer-readable instructions. The database may store control information sequences. When the computer-readable instructions are executed by the processor, they enable the processor to implement a cross-process image rendering method. The processor provides computing and control capabilities, supporting the operation of the entire computer device. The memory stores computer-readable instructions, which, when executed by the processor, enable the processor to execute a cross-process image rendering method. The network interface of the computer device is used for communication with a terminal. Those skilled in the art will understand that… Figure 12 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0170] In this embodiment, the processor executes the specific functions of each module / submodule in the cross-process image rendering apparatus of this application, and the memory stores the program code and various types of data required to execute the above modules. The network interface is used for data transmission between the user terminal and the server. In this embodiment, the memory stores the program code and data required to execute all modules / submodules in the cross-process image rendering apparatus, and the server can call the server's program code and data to execute the functions of all submodules.

[0171] This application also provides a non-volatile storage medium in which the cross-process image drawing method is written as a computer program and stored in the storage medium in the form of computer-readable instructions. When the computer-readable instructions are executed by one or more processors, it means that the program is running in the computer, thereby causing one or more processors to perform the steps of the cross-process image drawing method of any of the above embodiments.

[0172] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).

[0173] In summary, this application can reduce the image rendering pressure on the central processing unit and save running memory, thereby improving system stability.

[0174] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0175] Those skilled in the art will understand that the steps, measures, and solutions in the various operations, methods, and processes discussed in this application can be alternated, modified, combined, or deleted. Furthermore, other steps, measures, and solutions in the various operations, methods, and processes discussed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted. Furthermore, steps, measures, and solutions in the prior art that are similar to those disclosed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted.

[0176] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A cross-process image rendering method, characterized in that, Includes the following steps: In response to an image drawing event acting on the first image drawing process, the target handle corresponding to the image to be drawn in the image drawing event is obtained, wherein the first image drawing process is executed by the central processing unit, and the image to be drawn is an effect image frame of the animation effect control in the live broadcast interface. Based on the target handle, a shared buffer for the image to be drawn is generated. The shared buffer is located in external storage other than the terminal device's running memory and the central processing unit cache. An address mapping is established between the memory address of the image to be drawn in the first image drawing process and the disk address in the shared buffer. This includes: generating a shared buffer with the target handle; obtaining the first memory address of the image to be drawn in the first image drawing process; and establishing an address mapping between the first memory address and the first disk address in the shared buffer. Based on the memory address, reading the image data of the image to be drawn in the first image drawing process and storing the image data in the disk address of the shared buffer includes: determining the memory address pointer of the image to be drawn acting on the first image drawing process, and determining the target memory address corresponding to the memory address pointer; determining the end memory address corresponding to the target memory address as the address starting point according to a preset number of address reading steps; determining the memory address range between the target memory address and the end memory address, obtaining the image data stored in the memory address range, storing the image data in the disk address corresponding to the shared buffer; and adjusting the memory address pointer based on the end memory address. After the image to be drawn is completely stored in the shared buffer, the image to be drawn stored in the shared buffer is pushed to the second image drawing process to drive the second image drawing process to draw the image to be drawn, wherein the second image drawing process is executed by the image processor.

2. The method according to claim 1, characterized in that, The steps of responding to the image drawing event acting on the first image drawing process include the following steps: In response to a virtual gift gifting event in the live stream, obtain the target gift identifier of the virtual gift gifting event; Retrieve the animation effect control corresponding to the target gift identifier from the gift control library; the animation effect control contains the image to be drawn. The image to be drawn, contained in the animation effect control, is pushed to the first image drawing process, triggering the image drawing event acting on the image to be drawn.

3. The method according to claim 1, characterized in that, The step of completely storing the image to be drawn into the shared buffer, then pushing the image to be drawn to the second image drawing process to drive the second image drawing process to draw the image to be drawn includes the following steps: Based on each disk address in the shared buffer, obtain the image to be drawn, which is composed of the image data stored in each disk address; The image to be drawn is pushed to the second image drawing process, which then drives the second image drawing process to draw the image to be drawn according to a preset image filter algorithm; Obtain the vector image output by the second image drawing process.

4. The method according to claim 1, characterized in that, After completely storing the image to be drawn in the shared buffer, pushing the image to be drawn to the second image drawing process, and driving the second image drawing process to draw the image to be drawn, the following steps are included: Obtain the special effects image generated corresponding to the image to be drawn by the second image drawing process; The image callback method of the first image drawing process is invoked to send the special effect image back to the first image drawing process; The first image drawing process is driven to output the special effects image to the animation effects control for display.

5. The method according to claim 1, characterized in that, After completely storing the image to be drawn in the shared buffer, pushing the image to be drawn to the second image drawing process, and driving the second image drawing process to draw the image to be drawn, the following steps are included: Respond to the image display completion event applied to the animation effect control, and obtain the target handle corresponding to the image display completion event; Identify the target shared buffer corresponding to the target handle and remove the target shared buffer.

6. A cross-process image rendering apparatus, characterized in that, include: The drawing event response module is used to respond to image drawing events acting on the first image drawing process and obtain the target handle corresponding to the image to be drawn in the image drawing event. The first image drawing process is executed by the central processing unit, and the image to be drawn is the special effect image frame of the animation special effect control in the live broadcast interface. A buffer generation module is used to generate a shared buffer for the image to be drawn based on the target handle. The shared buffer is located in external storage other than the terminal device's running memory and the central processing unit cache. It also establishes an address mapping between the memory address of the image to be drawn in the first image drawing process and the disk address in the shared buffer. The module includes: generating a shared buffer with the target handle; obtaining the first memory address of the image to be drawn in the first image drawing process; and establishing an address mapping between the first memory address and the first disk address in the shared buffer. An image data buffer module is used to read image data of the image to be drawn in the first image drawing process based on the memory address, and store the image data in the disk address of the shared buffer, including: determining the memory address pointer of the image to be drawn acting on the first image drawing process, and determining the target memory address corresponding to the memory address pointer; determining the end memory address corresponding to the target memory address as the address starting point according to a preset number of address reading steps; determining the memory address range between the target memory address and the end memory address, obtaining the image data stored in the memory address range, storing the image data in the disk address corresponding to the shared buffer; and adjusting the memory address pointer based on the end memory address. An image sharing drawing module is used to completely store the image to be drawn into the shared buffer, and then push the image to be drawn stored in the shared buffer to the second image drawing process to drive the second image drawing process to draw the image to be drawn, wherein the second image drawing process is executed by the image processor.

7. The cross-process image rendering apparatus according to claim 6, characterized in that, The drawing event response module includes: The gift-giving event response submodule is used to respond to virtual gift-giving events that occur in the live stream room and to obtain the target gift identifier of the virtual gift-giving event. The special effects control query submodule is used to query the animation special effects control corresponding to the target gift icon from the gift control library. The animation special effects control contains an image to be drawn. The drawing event triggering submodule is used to push the image to be drawn contained in the animation effect control to the first image drawing process, and trigger the image drawing event acting on the image to be drawn.

8. The cross-process image rendering apparatus according to claim 6, characterized in that, The image sharing rendering module includes: The image to be drawn submodule is used to obtain the image to be drawn composed of image data stored in each of the disk addresses in the shared buffer. The image to be drawn submodule is used to push the image to be drawn to the second image drawing process and drive the second image drawing process to draw the image to be drawn according to a preset image filter algorithm; The vector image acquisition submodule is used to acquire the vector image output by the second image drawing process.

9. An electronic device comprising a central processing unit and a memory, characterized in that, The central processing unit is used to invoke and run a computer program stored in the memory to perform the steps of the method as described in any one of claims 1 to 5.

10. A non-volatile storage medium, characterized in that, It stores, in the form of computer-readable instructions, a computer program implemented according to any one of claims 1 to 5, which, when invoked by a computer, performs the steps included in the method.