CN-115437747-B - Virtual machine image rendering method and device, electronic equipment and storage medium
Abstract
The embodiment of the application discloses a virtual machine image rendering method, a virtual machine image rendering device, electronic equipment and a storage medium. The method comprises the steps of obtaining a function address to be called of a host, obtaining the function to be called from the host according to the function address to be called, updating an image rendering process according to the function to be called, and processing an image to be rendered by running the image rendering process to obtain a target image so as to instruct the host to render the target image. The embodiment of the application improves the image rendering efficiency of the virtual machine.
Inventors
- YU LIN
- WANG WEI
Assignees
- 大连九征科技有限公司
- 大连九征科技有限公司
Dates
- Publication Date
- 20260421
- Application Date
- 20220914
- Priority Date
- 20220914
Claims (8)
- 1. A virtual machine image rendering method, comprising: Acquiring a function address to be called corresponding to the function to be called in the host; updating an image rendering process according to the function address to be called; Processing the image to be rendered by running the image rendering process to obtain a target image so as to instruct the host machine to render the target image; the obtaining the function address to be called corresponding to the function to be called in the host machine comprises the following steps: According to the identification information of the function to be called, determining the address of the function to be called by traversing a function address list in an EGL/GLES shared library in the host; The processing the image to be rendered by running the image rendering process to obtain a target image so as to instruct the host machine to render the target image, including: calling the function to be called by running the image rendering process, and processing the image to be rendered to obtain a target image; and storing and sending the target image to the host machine to instruct the host machine to render the target image.
- 2. The method of claim 1, wherein updating the image rendering process according to the function address to be called comprises: And storing the function address to be called to the image rendering process to update the image rendering process.
- 3. The method of claim 2, wherein saving the function address to be called to the image rendering process comprises: And taking the function address to be called as a global variable, and storing the global variable into the image rendering process.
- 4. A virtual machine image rendering apparatus, comprising: the to-be-called function address acquisition module is used for acquiring the to-be-called function address corresponding to the to-be-called function in the host machine; The image rendering process updating module is used for updating the image rendering process according to the function address to be called; The target image acquisition module is used for processing the image to be rendered by running the image rendering process to obtain a target image so as to instruct the host machine to render the target image; The function address obtaining module to be called comprises: A function address list traversing unit, configured to determine, according to the identification information of the function to be called, the function address to be called by traversing a function address list in an EGL/GLES shared library in the host; The target image acquisition module comprises: The image processing unit to be rendered is used for calling the function to be called by running the image rendering process, and processing the image to be rendered to obtain a target image; and the target image sending unit is used for storing and sending the target image to the host machine so as to instruct the host machine to render the target image.
- 5. The apparatus of claim 4, wherein the image rendering process update module comprises: and the function address storage unit is used for storing the function address to be called to the image rendering process so as to update the image rendering process.
- 6. The apparatus according to claim 5, wherein the function address holding unit includes: and the global variable storage subunit is used for storing the function address to be called as a global variable to the image rendering process.
- 7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the virtual machine image rendering method of any one of claims 1-3 when the program is executed by the processor.
- 8. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements a virtual machine image rendering method as claimed in any one of claims 1-3.
Description
Virtual machine image rendering method and device, electronic equipment and storage medium Technical Field The embodiment of the application relates to computer technology, in particular to a virtual machine image rendering method, a device, electronic equipment and a storage medium. Background A virtual machine is an application running on a mobile phone, and a separate android system (client) is started inside the application, and can implement resource isolation between the system and a real system (host) of the mobile phone. In the prior art, when a client uses an interface programmed by an image rendering related application program, data of an image to be rendered needs to be converted through a conversion protocol, and then sent to a host through a pre-established channel, and the host is used for processing and rendering. However, in the prior art, asynchronous communication between the client and the host is required, and rendering efficiency is low. Disclosure of Invention The application provides a virtual machine image rendering method, a device, electronic equipment and a storage medium, so as to improve virtual machine image rendering efficiency. In a first aspect, an embodiment of the present application provides a virtual machine image rendering method, including: Acquiring a function address to be called corresponding to the function to be called in the host; updating the image rendering process according to the function address to be called; And processing the image to be rendered by running an image rendering process to obtain a target image so as to instruct a host to render the target image. In a second aspect, an embodiment of the present application further provides a virtual machine image rendering apparatus, including: The to-be-called function address acquisition module acquires a to-be-called function address corresponding to the to-be-called function in the host machine; The image rendering process updating module is used for updating the image rendering process according to the function address to be called; the target image acquisition module is used for processing the image to be rendered by running an image rendering process to obtain a target image so as to instruct the host machine to render the target image. In a third aspect, an embodiment of the present application further provides an electronic device, including: One or more processors; a storage means for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the virtual machine image rendering methods as provided by the embodiments of the present application. In a fourth aspect, embodiments of the present application also provide a storage medium comprising computer-executable instructions, which when executed by a computer processor, are for performing any one of the virtual machine image rendering methods as provided by the embodiments of the present application. According to the method, the function to be called corresponding to the function to be called in the host is obtained, the function to be called is obtained from the host according to the function address to be called, and the image rendering process is updated according to the function to be called. The client can directly call the function to be called in the host. And processing the image to be rendered by running an image rendering process to obtain a target image so as to instruct a host to render the target image. The processing of the image to be rendered is realized in the client to obtain the target image, the target image is directly sent to the host, and the host only needs to render the target image, so that the switching frequency between the client and the host is reduced. Therefore, the technical scheme solves the problem of low rendering efficiency caused by asynchronous communication between the client and the host in the prior art, and achieves the effect of improving the image rendering efficiency. Drawings FIG. 1 is a flow chart of a virtual machine image rendering method according to a first embodiment of the present application; FIG. 2 is a flow chart of a virtual machine image rendering method in a second embodiment of the present application; FIG. 3 is a schematic diagram of a call flow of a function to be called of a virtual machine according to a second embodiment of the present application; fig. 4 is a schematic structural diagram of a virtual machine image rendering device according to a third embodiment of the present application; fig. 5 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present application. Detailed Description In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is app