Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to programmatically test for browser GPU acceleration?

I want to include a few "bells and whistles" features on a site I'm currently developing, but I don't want to bog down the entire machine for my users. Is there a way I can test to see if the current browser is GPU accelerated?

I could just check against UserAgents, but I've always heard it's not accurate enough to trust.

I guess I could build a canvas element, make quite a few drawing calls, and time them? Anything under a certain threshold I could consider good enough for my superfluous extras? Would this be good enough?

like image 803
Emrikol Avatar asked Feb 11 '11 17:02

Emrikol


People also ask

Does Chrome use GPU acceleration?

Google Chrome comes equipped with hardware acceleration, a feature which takes advantage of your computer's GPU to speed up processes and free vital CPU time. However, sometimes driver incompatibilities can cause this feature to misbehave and disabling it could save you a few headaches.

How do I know if my GPU is acceleration?

The easiest way to know if you have hardware acceleration is through Chrome browser. Type in chrome://gpu to your address bar. If you see Hardware-accelerated next to most of the options here, you already have it enabled.

How do I know if my browser is using my GPU?

Show activity on this post. If you press Shift + Esc while in the browser it will bring up Google Chrome's internal Task Manager. If there is a process titled GPU Process, then that means Chrome is using hardware/GPU acceleration in order to display/render a particular page. Show activity on this post.


1 Answers

Why does it matter if its GPU accelerated? The only thing that should matter is performance.

So timing the canvas element is the better choice even if you could find out if there is GPU acceleration or not.

like image 85
CodesInChaos Avatar answered Oct 17 '22 11:10

CodesInChaos