- From: Justin Novosad <junov@google.com>
- Date: Mon, 4 Aug 2014 14:04:13 -0400
- To: WHAT Working Group <whatwg@whatwg.org>
Greetings all, In a drive to satisfy some the most demanding performance critical applications--2d platformer games--, browser vendors have put a lot of effort into optimizing CanvasRenderingContext2D, and the drawImage method in particular. In a world where browsers have GPU-accelerated graphics backends and complex multi-threaded rendering frameworks, the ultimate hurdle in relieving computational burden from the browser's main thread is: per draw call overhead. In a sprite based animation, the application may be calling drawImage hundreds or even thousands of times per animation frame. The script bindings and browser internal bookkeeping that is performed on a per draw call basis is a O(N) cost that could be made O(1) by introducing batch versions of drawImage. Benchmark experiments performed using Chrome on mobile and desktop platforms show that this is currently the main obstacle standing in the way of achieving near-native rendering performance. Here is what I am proposing: http://wiki.whatwg.org/wiki/Canvas_Batch_drawImage Feedback wanted. Cheers, -Justin Novosad
Received on Monday, 4 August 2014 18:05:40 UTC