twkmz
twkmz

Reputation: 449

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!

Upvotes: 16

Views: 13891

Answers (1)

Anand Sudhanaboina
Anand Sudhanaboina

Reputation: 885

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

Upvotes: 24

Related Questions