5
votes

How to enable WebGL in WebView widget for Android 5.1.1 emulator? I checked WebGL status through Webglreport and the result was "This browser supports WebGL, but it is disabled or unavailable. Sometimes this is the result of older video drivers being rejected by the browser. Try updating your video drivers if possible".

I also tried to use Crosswalk webview on Android 4.4.4 emulator and there were same problems, but I fixed it by adding xwalk-command-line xwalk --ignore-gpu-blacklist. Is it possible to make something similar for standard WebView widget?

1
I was using Chrome for my Android device, I removed from Apps, then I used Android's default webView app called Android System webView and WebGL mistake is solved. (Chrome App v77.0.3865.92 doesn't support WebGL) Edit: Opera web browser is working fine.Bay

1 Answers

4
votes

UPDATE: The WebView team says WebView does not allow gpu blacklist override, now or in future plans, due to security/stability risks: more details.

//

Chrome for Android 47 and Chromium/WebView 47 use different gpu blacklists and/or bug workarounds. What is allowed to successfully render in one may not be allowed to successfully render in the other even on the same hardware. Both browsers are scheduled to release updates to the Play Store every 6 weeks.

For example: I have a Nexus 10, Mali T-604 tablet (Lollipop 5.1.1. Also, Android Studio 1.5.1 with SDK 6.0 Marshmallow API 23 or 22).

In Chrome for Android --

  • chrome://flags, #ignore-gpu-blacklist NOT enabled, and all reset defaults
  • chrome://gpu, "graphics feature status-WebGL: Hardware accelerated" and Reset notification strategy 0x0000 surprisingly (see this last Crosswalk related) answer
  • webglreport, "This browser supports WebGL 1"
  • get.webgl.org, cube spins

In WebView --

  • webglreport, "This browser supports WebGL 1, but it is disabled or unavailable. Sometimes this is the result of older video drivers being rejected by the browser. Try updating your video drivers if possible."
  • get.webgl.org, "Hmm. While your browser seems to support WebGL, it is disabled or unavailable. If possible, please ensure that you are running the latest drivers for your video card."

chromium blacklist (link from Khronos WebGL blacklist wiki): "GPU rasterization and canvas is blacklisted on Nexus 10".

chromium bug list (link from Khronos WebGL blacklist wiki): "The Mali-Txxx driver does not guarantee flush ordering" and "The Mali-Txxx driver hangs when reading from currently displayed buffer".

The Pixel C tablet has a Nvidia Tegra X1 which does not appear on the chromium lists, and I've confirmed that it does support WebGL in WebView.