google chrome - Is it possible to force multiple paint operations on a 2D canvas (software rendering)? -


I am working on a game that uses HTML5 canvas 2D reference graphs on a Chromecast device (in which Hardware acceleration is not). I have noticed that by dragging two objects in one frame, the whole area can be painted again. As "worst condition", imagine that I only want to change the color of the top-left and bottom-right pixels of a large canvas element. If I use two one pixel fill calls to do this, then it will trigger a very expensive paint operation (at least webkit / blink, complete canvas dirty mark), I believe it should be linked to the code that executes this argument in Chromium:

Is the browser really a (mostly) big one? Or will it always be slow, despite the fact that it is quite low? I have tried to put elements on different canvas layers layered above each other, but the browser still seems to catch it and batch them together (at least as shown by the areas redistributed in distorts).

As far as I know, you can not do better at present; One major drawback is that double buffering is not implemented either, which would improve performance. We will be looking at improvement in these moving areas.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -