15 2 / 2013
All of the rendering of these apps is done in one large canvas element, which you’d think might be slow, but it turns out that at least for all of the demos I tried, it’s actually really fast and responsive. Of course, Qt has its own image generation routines built in so it’s using the canvas as basically a way to blit pixels to the screen and nothing more. It’s pretty much the only way this could possibly work, without rewriting large parts of Qt itself, and it turns out that it works pretty well. They have an “experimental renderer” that you can enable, that is supposedly faster but I haven’t seen much of a difference.
Let me just make this clear: the only canvas method emscripten-qt is using for rendering is putImageData. Nothing else. All text, paths, gradients, and all UI components are all rendered by Qt to pixels before even making it to the canvas. And it’s still pretty darn fast and smooth. I think this is both a confirmation that entirely canvas based UI toolkits could be possible as well as a showcase for the power of Emscripten to make use of already written and optimized code on the web.