ochi12 ochi12 - 1 year ago 53
Javascript Question

Is canvas element in html5 hardware accelerated?

I'm pretty new to web development, in fact I'm thinking of diving into html and js for game developing.

So, before doing anything, I need to know whether or not the "canvas" element in html5 is hardware accelerated. If it's not, then I would need to use something like webgl? I don't know if it matters, but the browser I'm using is firefox(maybe it varies between browsers)

It might seem stupid, but it's an important question, specially since in games you have a bunch of 2d sprites being drawed all around.
Thanks in advance!

Answer Source

Yes HTML5 Canvas is hardware accelerated but it require a Hardware Accelerated Browser. If you use chrome you can check this out by going to chrome://gpu/

Here is an example on how it looks:

enter image description here

A few articles on the same:

  1. chromium.org
  2. msdn.microsoft.com