发明名称 METHOD, APPARATUS AND STORAGE MEDIUM FOR PROCESSING HTML5 CANVAS APPLICATION
摘要 The present invention provides a method, an apparatus and a storage medium for processing an HTML5 Canvas application, said method comprising: in the first thread: CPU executes codes of a graphic drawing application to draw each frame of canvas, when it is detected that rendering is needed, all canvas drawing commands of said frame of canvas are cached without executing the corresponding rendering, and when the drawing of said frame of canvas is completed, all the cached canvas drawing commands of said frame of canvas are sent to a second thread; in the second thread, CPU calls GPU to execute all canvas drawing commands of each frame of canvas sent by the first thread, and GPU performs rendering on each frame of canvas according to the canvas drawing commands. The present invention realizes concurrent thread processing by means of caching drawing commands such that JavaScript codes and rendering can be executed simultaneously. As a result, resources of different threads are fully used to greatly increase the response speed of the HTML5 Canvas application and improve the performance of the HTML5 Canvas application.
申请公布号 US2016162171(A1) 申请公布日期 2016.06.09
申请号 US201514980590 申请日期 2015.12.28
申请人 GUANGZHOU UCWEB COMPUTER TECHNOLOGY CO., LTD. 发明人 YI Xuxin
分类号 G06F3/0484;G06F17/22 主分类号 G06F3/0484
代理机构 代理人
主权项 1. A method for processing an HTML5 Canvas application, comprising: in a first thread, CPU executes codes of a graphic drawing application to draw each frame of canvas, wherein, during the drawing process of each frame of canvas, when it is detected that rendering is needed, all canvas drawing commands of said frame of canvas are cached without executing the rendering corresponding to the canvas drawing commands, and when the drawing of said frame of canvas is completed by executing the codes of the graphic drawing application, all the cached canvas drawing commands of said frame of canvas are sent to a second thread; and in a second thread, CPU calls GPU to execute all canvas drawing commands of each frame of canvas sent by the first thread, and GPU performs rendering on each frame of canvas according to the canvas drawing commands.
地址 Guangzhou CN