javascript - Google Chrome hardware acceleration making game run slow -
so have been working on game in html5 canvas , noticed games lags , performs slower when hardware acceleration turned on in google chrome when turned off. can try here
from doing profiling see problem lies in drawimage
. more drawing 1 canvas onto another. lot of this.
hardware acceleration on.
hardware acceleration off.
is there fundamental missing 1 canvas another? why difference profound?
if remember correctly, in-dom canvases loaded gpu memory in chrome, , off-dom canvases may not be. each drawimage off-screen canvas on-screen canvas results in loading content of canvas onto gpu texture, followed copy of memory on-gpu onto on-screen canvas. cost of sending new texture through gpu can quite high. loading textures high-throughput, high-latency, on gpus.
someone chrome team have chime in definitive answer, fits experience canvases in chrome.
Comments
Post a Comment