Method, device and equipment for rendering images of transplanted application programs based on GPU of smart TV
By building a multi-artboard and multi-threaded rendering mechanism on smart TVs, the hardware problem of smart TV devices running high-resource requirements applications is solved, and the smooth operation of the application on the TV side is achieved.
Patent Information
- Application Number
- CN202510174354.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-02-18
AI Technical Summary
When porting mobile or cloud applications to smart TVs, some TV devices cannot fully run applications with high resource requirements due to insufficient hardware configuration, resulting in problems such as screen frizz, screen defects or black screens.
By pre-constructing at least two artboards and splitting the original main rendering thread into two threads, one of which is responsible for loading the resources to be rendered and cleaning up the content of the displayed artboards, the other thread focuses on filling the resources to be rendered on each artboard, dynamically adjusting the depth value of the artboard to change the hierarchy relationship, and realizing the rendering processing of multi-threaded parallel collaboration and rotation artboards.
It reduces the need for rendering computing power for the graphics and image processor of TV equipment, effectively avoids the abnormal display of pictures, and enables high-quality portable applications to run smoothly on the TV side.
Smart Images

Figure CN119653149B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of running transplanted application programs on smart TVs, and in particular, to a method, device, and equipment for rendering images of transplanted application programs based on the GPU of a smart TV. Background Art
[0002] The mobile and cloud application industries have developed rapidly, and the demand for transplanting high-quality content to Android smart TV devices has also increased accordingly. However, even though the mobile and TV sides are both Android smart systems, there are significant differences in hardware configurations, resulting in some TV device hardware being unable to fully run the transplanted high-quality APPs (which are complex to process, resource-rich, and require high computing power). For example, there are problems such as less rendering memory and insufficient rendering computing power on the device, and the display effects presented to users will show screen distortion, incomplete images, or even black screens.
[0003] Therefore, currently, when transplanting application programs such as mobile APPs or cloud games to smart TVs, a large amount of debugging is still required for the compatibility of the TV device's operating environment, and additional redesign may also be necessary. For example, but not limited to, reducing the color values of the overall resources of the transplanted APP, reducing the size, or preparing multiple sets of resources, resulting in extremely high R & D time and labor costs. Summary of the Invention
[0004] In view of the above, the present invention aims to provide a method, device, and equipment for rendering images of transplanted application programs based on the GPU of a smart TV, so as to solve the high cost problem of transplanting mobile or cloud application programs to smart TVs, and improve the success rate of running transplanted application programs on smart TV models.
[0005] The technical solution adopted by the present invention is as follows:
[0006] In a first aspect, the present invention provides a method for rendering images of transplanted application programs based on the GPU of a smart TV, which includes:
[0007] Pre-create the same second drawing board based on the original first drawing board, and split the original single rendering thread into a first thread and a second thread;
[0008] The second thread loads the currently to-be-rendered resource, and the first thread draws on the blank first drawing board;
[0009] The first thread raises the level of the drawn first drawing board and outputs it for display;
[0010] The first thread draws the next to-be-rendered resource loaded by the second thread on the blank second drawing board, and the second thread clears the first drawing board to make it blank;
[0011] The first thread raises the level of the second drawing board that has been drawn and outputs it for display, and based on the next resource to be rendered loaded by the second thread, draws the first drawing board that has been cleared to a blank state;
[0012] The first thread and the second thread alternately and circularly execute the tasks of loading, drawing, and clearing by using the first drawing board and the second drawing board according to the above steps to complete the image rendering process of the ported application.
[0013] In at least one possible implementation manner, the method for creating the second drawing board includes: copying the pre-configured first drawing board to obtain the second drawing board, and both drawing boards include depth values for changing the level of the drawing board.
[0014] In at least one possible implementation manner, the method for dynamically adjusting the level of the drawing board includes: assigning a value to the depth value of the currently drawn drawing board by accumulating numerical values.
[0015] In at least one possible implementation manner, the method for dynamically adjusting the level of the drawing board further includes: by resetting the numerical value, restoring the depth value of the cleared drawing board to the initial value while or after clearing the drawing board.
[0016] In at least one possible implementation manner, the second thread loads the currently to-be-rendered resource, and the first thread draws on the blank first drawing board, specifically including: based on the transplanted application instructions, the second thread pre-loads the currently to-be-rendered resource from the operating memory of the TV, and then the first thread draws the currently to-be-rendered resource on the first drawing board according to the application instructions.
[0017] In at least one possible implementation manner, the image rendering method further includes:
[0018] Based on different resources to be rendered, while the second thread loads the currently to-be-rendered resource, set the corresponding drawing duration threshold;
[0019] When the first thread draws the currently to-be-rendered resource, if the drawing is not completed when the drawing duration threshold is reached, the second thread clears the currently output display drawing board and forces its depth value to remain unchanged until the first thread completes the current drawing task.
[0020] In a second aspect, the present invention provides a ported application image rendering device based on an intelligent TV GPU, which includes:
[0021] A GPU pre-configuration module, configured to pre-create the same second drawing board based on the original first drawing board, and split the original single rendering thread into a first thread and a second thread;
[0022] A multi-threaded and multi-drawing board alternating rendering module is used to perform the following:
[0023] The second thread loads the currently to-be-rendered resource, and the first thread draws on the blank first drawing board;
[0024] The first thread raises the level of the completed first drawing board for output display;
[0025] The first thread draws the next to-be-rendered resource loaded by the second thread on the blank second drawing board, and the second thread clears the first drawing board to make it blank;
[0026] The first thread raises the level of the completed second drawing board for output display, and based on the next to-be-rendered resource loaded by the second thread, draws on the first drawing board that has been cleared to be blank;
[0027] The first thread and the second thread alternately and circularly execute loading, drawing, and clearing tasks using the first drawing board and the second drawing board according to the above steps to complete the image rendering process of the transplanted application.
[0028] In a third aspect, the present invention provides an electronic device, which includes: one or more processors, a memory, and one or more computer programs. The memory can adopt a non-volatile storage medium. The one or more computer programs are stored in the memory. The one or more computer programs include instructions. When the instructions are executed by the device, the electronic device executes the method as described in the first aspect or any possible implementation manner of the first aspect.
[0029] In a fourth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored. When it runs on a computer, the computer executes the method as described in the first aspect or any possible implementation manner of the first aspect.
[0030] In a fifth aspect, the present invention further provides a computer program product. When the computer program product is executed by a computer, it is used to execute the method as described in the first aspect or any possible implementation manner of the first aspect. In a possible design of the fifth aspect, the relevant programs involved in this product can be stored in whole or in part in the memory packaged together with the processor, or can be stored in whole or in part in a storage medium not packaged together with the processor.
[0031] It should be understood that the technical solutions of the second to fifth aspects of the embodiments of the present application are consistent with those of the first aspect of the embodiments of the present application. The beneficial effects obtained by each aspect and the corresponding feasible implementation manners are similar and will not be repeated.
[0032] The main design concept of the present invention is to provide an optimization solution for the problem that high-quality application programs on the mobile phone side and cloud side cannot run smoothly on TV devices due to their large resources, resulting in high rendering computing power required during operation. Specifically, at least two drawing boards are pre-constructed and the original main rendering thread is split into at least two threads. One thread is responsible for loading the resources to be rendered and clearing the content of the displayed drawing board, and the other thread focuses on sequentially filling the resources to be rendered on each drawing board. During this process, the depth values of each drawing board are dynamically adjusted to change the hierarchical relationship, so that the drawing board on the top displays the completed drawn content, and the drawing board on the bottom performs the drawing of the next content. Thus, the tasks of loading, drawing, and clearing are cyclically executed to complete the image rendering process of the transplanted application program. The mechanism of the present invention is to reduce the memory data and convert it into video memory data, and then through multi-threaded parallel cooperation and rotation of the drawing board levels, reduce the rendering computing power requirements for the graphics processing unit of the TV device, effectively avoiding the abnormal display of the screen. Therefore, high-quality transplanted application programs can run smoothly on the TV side. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] To make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described below with reference to the accompanying drawings, where:
[0034] Figure 1 is a schematic flowchart of a method for rendering images of a transplanted application program based on an intelligent TV GPU provided by an embodiment of the present invention;
[0035] Figure 2 is a schematic diagram of a device for rendering images of a transplanted application program based on an intelligent TV GPU provided by an embodiment of the present invention.
[0036] Figure 3 is a schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0037] The embodiments of the present invention will be described in detail below. The examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals represent the same or similar elements or elements with the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention and should not be construed as limiting the present invention.
[0038] The present invention proposes an embodiment of a method for rendering images of a transplanted application program based on an intelligent TV GPU. Specifically, as Figure 1 shown, which includes:
[0039] Step S1, pre-create the same second drawing board based on the original first drawing board, and split the original single rendering thread into a first thread and a second thread;
[0040] Specifically regarding this step, on the one hand, by means of replication and cloning, an additional identical drawing board (i.e., the second drawing board, also referred to as the second canvas) can be created for at least one pre-configured drawing board (i.e., the first drawing board, also referred to as the first canvas) in the graphics processing unit (GPU), and a depth value parameter for changing the hierarchical relationship of the drawing boards can be set in both drawing boards. On the other hand, the main rendering thread of the GPU is disassembled and divided, that is, handed over to at least two sub-threads (i.e., the first thread and the second thread) to perform their respective duties.
[0041] Step S2: The second thread loads the currently to-be-rendered resource, and the first thread performs drawing on the blank first drawing board.
[0042] The specific links involved in this step can be referred to as follows: Based on the transplanted application instructions, the second thread loads at least one frame (which can be understood as a pre-set time unit) in advance from the operating memory of the television device into the frame of the program currently to be rendered, and the first thread draws this frame of image on the first drawing board (since the first drawing board and the second drawing board are exactly the same, the mention of the first drawing board here is only to represent choosing one of the two drawing boards). Of course, those skilled in the art can understand that when initially rendering the first frame of the image, it can be chosen arbitrarily. If it is not the first frame rendering, it is drawn on the current blank drawing board, which will be described later.
[0043] Step S3: The first thread promotes the hierarchical level of the drawn first drawing board and outputs it for display.
[0044] Combined with the previous embodiments, the purpose of promoting the hierarchical level of the drawing board is to make it the output display screen visible to the user, and the way to promote the hierarchical level can be achieved by adjusting the above-mentioned depth value of the drawing board. For example, by accumulating the depth value, assuming that the currently drawn drawing board is assigned 1, and then for the next drawn drawing board, +1 is added, then the hierarchical level of the next drawing board will be promoted above the drawing board assigned 1, and the function of alternately outputting and displaying the screen can be achieved. Of course, in addition to the way of accumulating the depth value, in other embodiments of the present invention, a depth value modulation mechanism of clearing and resetting can also be adopted, which will be described later.
[0045] Step S4: The first thread draws the next to-be-rendered resource loaded by the second thread on the blank second drawing board, and the second thread clears the first drawing board to make it in a blank state.
[0046] It can be seen from this that the aforementioned first thread and the second thread have clear divisions of labor. In this embodiment, the first thread is only responsible for drawing the to-be-rendered image on the blank drawing board and promoting the hierarchical level of the drawn drawing board to display it in front of the user; while the responsibility of the second thread is to load the image resources to be rendered from the operating memory according to the program design and to clear and reset the drawing board after rendering and displaying.
[0047] Regarding reset, based on this concept, the present invention proposes that in some other embodiments, a depth value modulation mechanism of clearing and resetting can also be adopted: while the second thread is performing the drawing board cleaning task, it also "cleans" the depth value of the drawing board, that is, the action of cleaning the drawing board includes resetting the depth value of the drawing board to the initial value (such as 0). Since the depth value of this drawing board is restored to the initial value, this drawing board will drop from the upper layer to the lower layer and no longer be output and displayed to the user. This state can be understood as that the cleared blank drawing board is below the drawing board that is currently being output and displayed at the upper layer and is ready for the first thread to draw the next frame of the picture. For example, when the first thread performs the task of promoting the drawing board level, it no longer adds values, but is similar to setting the depth value of the drawn drawing board from 0 to 1; while the second thread sets the depth value of the cleared drawing board from 1 to 0 when cleaning the drawing board.
[0048] It can be seen that in the embodiment of this reset mechanism, compared with the embodiments mentioned above, the responsibility of the second thread can be considered to be an additional task, that is, resetting the depth value; and in actual operation, this additional task can be included in "cleaning the drawing board".
[0049] Step S5: The first thread promotes the level of the drawn second drawing board for output display, and based on the next resource to be rendered loaded by the second thread, draws the first drawing board that has been cleared to a blank state;
[0050] The first thread and the second thread alternately and circularly execute the loading, drawing, and cleaning tasks using the first drawing board and the second drawing board according to the above steps to complete the image rendering process of the ported application program.
[0051] Finally, it can be added that in addition to alternately and circularly executing the loading, drawing, and cleaning tasks, the dynamic adjustment of the depth value of each drawing board is also a key task proposed by the present invention, because the adjustment of the depth value is directly related to the picture effect presented to the user. Therefore, in some other preferred embodiments of the present invention, the following measures are also included:
[0052] Based on different resources to be rendered, while the second thread loads the current resource to be rendered, set the corresponding drawing duration threshold;
[0053] When the first thread is rendering the currently to-be-rendered resource, if the rendering duration threshold is reached and the rendering is not completed yet, the second thread clears the currently output display drawing board and forces its depth value to remain unchanged until the first thread completes the current rendering task. This is considering that in the real scenario, the processing time of the above process and the rendering duration threshold are relatively short compared to the human eye recognition ability, and it is difficult for the human eye to capture that the drawing board displayed on the upper layer is cleared to a blank state during this process. And just this process of clearing first and then lowering the layer can reserve more rendering and filling time for the first thread.
[0054] In summary, the main design concept of the present invention is to provide an optimization solution for the problem that high-quality application programs on mobile phones and the cloud have large resources, resulting in high rendering computing power required during operation and unable to run smoothly on TV devices. Specifically, at least two drawing boards are pre-constructed and the original main rendering thread is split into at least two threads. One thread is responsible for loading the to-be-rendered resource and clearing the content of the already displayed drawing board, and the other thread focuses on sequentially filling the to-be-rendered resource on each drawing board. During this process, the depth values of each drawing board are dynamically adjusted to change the hierarchical relationship, so that the drawing board on the upper layer displays the completed drawn content, and the drawing board on the lower layer performs the drawing of the next content. Thus, the tasks of loading, drawing, and clearing are cyclically executed to complete the image rendering process of the transplanted application program. The mechanism of the present invention is to reduce memory data and convert it into video memory data, and then rotate the drawing boards through multi-threaded parallel cooperation, reducing the rendering computing power requirements for the graphics image processor of the TV device, effectively avoiding the abnormal display of the screen, and thus enabling high-quality transplanted application programs to run smoothly on the TV side.
[0055] Corresponding to the above-mentioned various embodiments and preferred solutions, the present invention also provides an embodiment of an image rendering device for transplanted application programs based on the GPU of a smart TV, as Figure 2 shown, which may specifically include the following components:
[0056] The GPU pre-configuration module 201 is used to pre-create the same second drawing board based on the original first drawing board and split the original single rendering thread into a first thread and a second thread;
[0057] The multi-threaded and multi-drawing board alternating rendering module 202 is used to perform the following:
[0058] The second thread loads the currently to-be-rendered resource, and the first thread performs drawing on the blank first drawing board;
[0059] The first thread raises the level of the drawn first drawing board for output display;
[0060] The first thread draws the next resource to be rendered loaded by the second thread on a blank second drawing board, and the second thread clears the first drawing board to make it in a blank state;
[0061] The first thread raises the level of the drawn second drawing board for output display, and based on the next resource to be rendered loaded by the second thread, draws the first drawing board that has been cleared to a blank state;
[0062] The first thread and the second thread alternately and circularly execute loading, drawing, and clearing tasks using the first drawing board and the second drawing board according to the above steps to complete the image rendering process of the ported application.
[0063] It should be understood that the division of each component in the above Figure 2 ported application image rendering device based on the smart TV GPU is only a division of logical functions. In actual implementation, it can be fully or partially integrated into a physical entity, or physically separated. And these components can all be implemented in the form of software called by a processing element; some components can also be implemented in the form of software called by a processing element, and some components are implemented in the form of hardware. For example, a certain above-mentioned module can be a separately established processing element, or can be integrated in a certain chip of an electronic device. The implementation of other components is similar. In addition, these components can be fully or partially integrated together, or can be independently implemented. In the implementation process, each step of the above method or each of the above components can be completed by the integrated logic circuit in the processor element or the instruction in the form of software.
[0064] For example, the above components can be one or more integrated circuits configured to implement the above method, such as: one or more application specific integrated circuits (ASICs), or, one or more digital signal processors (DSPs), or, one or more field programmable gate arrays (FPGAs), etc. Again, these components can be integrated together to be implemented in the form of a system-on-a-chip (SOC).
[0065] Based on the above embodiments and their preferred solutions, those skilled in the art can understand that in actual operation, the technical concept involved in the present invention can be applied to various implementation manners. The following carriers are used as schematic illustrations of the present invention:
[0066] (1)An electronic device. Specifically, the device may include: one or more processors, a memory, and one or more computer programs, where the one or more computer programs are stored in the memory, and the one or more computer programs include instructions that, when executed by the device, cause the device to perform the steps / functions of the foregoing embodiments or equivalent embodiments.
[0067] The electronic device may specifically be an electronic device related to a computer, such as, but not limited to, various computing terminals and electronic products, etc. Preferably, the electronic device includes a smart battery, such as an Android TV, etc.
[0068] Specifically, the processor, communication interface, and memory can all communicate with each other via a communication bus. Among them, the processor may be a central processing unit (CPU), a digital signal processor (DSP), a microcontroller, or a digital signal processor, and may also include a graphics processing unit (GPU), an embedded neural network processor (Neural-network Process Units; hereinafter referred to as: NPU), and an image signal processor (Image Signal Processor; hereinafter referred to as: ISP). The processor may also include a specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. In addition, the processor may have the function of operating one or more software programs, and the software programs may be stored in a storage medium such as a memory; and the foregoing memory / storage medium may include: non-volatile memory, such as a non-removable disk, a USB flash drive, a mobile hard disk, an optical disc, etc., as well as a read-only memory (hereinafter referred to as: ROM), a random access memory (hereinafter referred to as: RAM), etc.
[0069] Even though the present invention does not limit the specific form of the electronic device, for illustrative introduction, Figure 3 As shown, the present invention provides a schematic structural diagram of an embodiment of an electronic device. Specifically, the electronic device 900 includes a processor 910 and a memory 930. Among them, the processor 910 and the memory 930 can communicate with each other via an internal connection path to transmit control and / or data signals. The memory 930 is used to store a computer program, and the processor 910 is used to call and run the computer program from the memory 930. The above-mentioned processor 910 and the memory 930 may be integrated into a processing device, and more commonly, they are independent components. The processor 910 is used to execute the program code stored in the memory 930 to implement the above functions. Specifically, in implementation, the memory 930 may also be integrated in the processor 910, or independent of the processor 910.
[0070] In addition, in order to make the functions of the electronic device 900 more complete, the electronic device 900 may further include one or more of an input unit 960, a display unit 970, an audio circuit 980, a camera 990, a sensor 901, etc. The audio circuit may further include a speaker 982, a microphone 984, etc. Among them, the display unit 970 may include a display screen.
[0071] Furthermore, the above-mentioned electronic device 900 may further include a power supply 950 for supplying electrical energy to various components or circuits in the electronic device 900.
[0072] It should be understood that Figure 3 the illustrated electronic device 900 can implement each process of the method provided in the foregoing embodiments. The operations and / or functions of each component in the electronic device 900 can respectively implement the corresponding processes in the above method embodiments. For details, reference may be made to the descriptions of the method, device, etc. in the foregoing text. To avoid repetition, the detailed description is appropriately omitted here.
[0073] It should be understood that Figure 3 the processor 910 in the illustrated electronic device 900 may be a system-on-chip (SOC). The processor 910 may include a central processing unit (hereinafter referred to as CPU), and may further include other types of processors, such as a graphics processing unit (hereinafter referred to as GPU), etc., which will be further introduced hereinafter.
[0074] In summary, each part of the processor or processing unit inside the processor 910 can cooperate together to implement the previous method process, and the corresponding software programs of each part of the processor or processing unit can be stored in the memory 930.
[0075] (2) A computer data storage medium, on which a computer program or the above-mentioned device is stored. When the computer program or the above-mentioned device is executed, the computer is made to execute the steps / functions of the foregoing embodiments or equivalent embodiments.
[0076] In several embodiments provided by the present invention, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer data storage medium. Based on such an understanding, some technical solutions of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of the following software products.
[0077] In particular, it should be noted that the storage medium may refer to a server or a similar computer device. Specifically, that is to say, the computer program or the above-mentioned device is stored in the storage device of the server or a similar computer device.
[0078] (3) A computer program product (the product may include the above-mentioned device). When the computer program product runs on a terminal device, it causes the terminal device to execute the method for rendering an application program image based on an intelligent TV GPU in the foregoing embodiment or an equivalent implementation manner.
[0079] From the description of the above embodiments, those skilled in the art can clearly understand that all or part of the steps in the above implementation methods can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the above computer program product may include, but is not limited to, forms such as an APP, a program package, a computing power optimization library, etc.
[0080] In the embodiments of the present invention, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent the case where A exists alone, A and B exist simultaneously, or B exists alone. Where A and B may be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, and c may represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c may be single or multiple.
[0081] Those skilled in the art can realize that the modules, units, and method steps described in the embodiments disclosed in this specification can be implemented by a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0082] In addition, the various embodiments in this specification are described in a progressive manner, and the same or similar parts among the various embodiments can be referred to each other. In particular, for embodiments such as devices and equipment, since they are basically similar to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The embodiments of the devices and equipment described above are only illustrative. The modules, units, etc. described as separate components may or may not be physically separated, that is, they may be located in one place, or they may be distributed to multiple places, such as the nodes of a system network. Specifically, some or all of the modules and units can be selected according to actual needs to achieve the purpose of the above embodiment solutions. Those skilled in the art can understand and implement without creative efforts.
[0083] The structure, features and effects of the present invention have been described in detail based on the embodiments shown in the drawings above. However, the above are only the preferred embodiments of the present invention. It should be noted that for the technical features involved in the above embodiments and their preferred modes, those skilled in the art can reasonably combine and match them into multiple equivalent solutions without departing from or changing the design concept and technical effects of the present invention. Therefore, the present invention is not limited by the scope shown in the drawings. Any changes made according to the concept of the present invention, or equivalent embodiments modified into equivalent changes, should still be within the protection scope of the present invention as long as they do not exceed the spirit covered by the specification and the drawings.
Claims
1. A method for rendering an image of a transplanted application based on a smart TV GPU, characterized in that: include: Pre-create an identical second artboard based on the original first artboard, and split the original single rendering thread into a first thread and a second thread, wherein both artboards contain depth values for changing the artboard hierarchy; The second thread loads the current resource to be rendered, and the first thread draws on the blank first drawing board, including: based on the transplanted application instructions, the second thread loads the current resource to be rendered from the running memory of the TV in advance, and then the first thread draws the current resource to be rendered on the first drawing board according to the application instructions; The first thread upgrades the level of the first drawing board after drawing to output and display; The first thread draws the next resource to be rendered loaded by the second thread on a blank second drawing board, and the second thread clears the first drawing board to make it blank; The first thread upgrades the level of the second drawing board that has been drawn to output and display it, and draws the first drawing board that has been cleared to a blank state based on the next resource to be rendered loaded by the second thread; The first thread and the second thread use the first drawing board and the second drawing board alternately and cyclically perform loading, drawing, and clearing tasks according to the above steps to complete the image rendering processing of the transplanted application.
2. The method for rendering an image of a transplanted application based on a smart TV GPU according to claim 1, characterized in that: The method of creating the second artboard includes: copying the pre-configured first artboard to obtain the second artboard.
3. The method for rendering an image of a transplanted application based on a smart TV GPU according to claim 1, characterized in that: The dynamic adjustment method of the artboard level includes: assigning a depth value of the currently drawn artboard by accumulating values.
4. The method for rendering an image of a transplanted application based on a smart TV GPU according to claim 1, characterized in that: The dynamic adjustment method of the artboard level also includes: by resetting the value, while or after clearing the artboard, restoring the depth value of the cleared artboard to the initial value.
5. The method for rendering an image of a transplanted application based on a smart TV GPU according to any one of claims 1 to 4, characterized in that: The image rendering method further comprises: Based on different resources to be rendered, while the second thread is loading the current resource to be rendered, setting a corresponding drawing duration threshold; When the first thread draws the current resource to be rendered, if the drawing is not completed before the drawing time threshold is reached, the second thread clears the current output display board and forces its depth value to remain unchanged until the first thread completes the current drawing task.
6. A transplanted application image rendering device based on a smart TV GPU, characterized in that: include: A GPU pre-configuration module, used to pre-create an identical second artboard based on the original first artboard, and split the original single rendering thread into a first thread and a second thread, wherein both artboards contain a depth value for changing the artboard level; The multi-threaded multi-artboard alternating rendering module is used to perform the following: The second thread loads the current resource to be rendered, and the first thread draws on the blank first drawing board, including: based on the transplanted application instructions, the second thread loads the current resource to be rendered from the running memory of the TV in advance, and then the first thread draws the current resource to be rendered on the first drawing board according to the application instructions; The first thread upgrades the level of the first drawing board after drawing to output and display; The first thread draws the next resource to be rendered loaded by the second thread on a blank second drawing board, and the second thread clears the first drawing board to make it blank; The first thread upgrades the level of the second drawing board that has been drawn to output and display it, and draws the first drawing board that has been cleared to a blank state based on the next resource to be rendered loaded by the second thread; The first thread and the second thread use the first drawing board and the second drawing board alternately and cyclically perform loading, drawing, and clearing tasks according to the above steps to complete the image rendering processing of the transplanted application.
7. An electronic device, characterized in that: include: One or more processors, a memory, and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the electronic device, enable the electronic device to execute the transplanted application image rendering method based on the smart TV GPU as described in any one of claims 1 to 5.
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 method for rendering an image of a transplanted application based on a smart TV GPU as described in any one of claims 1 to 5 is implemented.
9. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for rendering an image of a transplanted application based on a smart TV GPU as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Processing method, processing device and processor of HTML5 Canvas application
CN103399729A
Projection screen annotation method and system
CN107168674A