Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically disable canvas hardware acceleration in browser

I'm working on a project which uses a Canvas to render content. Testing with Chrome 37 on an android tablet gives rendering artefacts. Namely black bloxes.

Disabling the Canvas hardware accelaration via chrome://flags results in correct rendering of the canvas.

Is there a way to disable the canvas hardware acceleration? Preferably via CSS or javascript?

like image 858
wasigh Avatar asked Oct 21 '22 01:10

wasigh


1 Answers

This is an older question, but the answer is still the same, no there is not. Disabling via chrome://flags or at the command line/shortcut are the only way to disable/enable any of the chrome switches (flags).

It's a browser level thing and out of the scope of the ECMAScript and CSS spec -- you cannot even check which switches are enabled/disabled programmatically. The switches/flags exist for developmental purposes and can be removed without any notice.

like image 154
Arthur Weborg Avatar answered Oct 27 '22 21:10

Arthur Weborg