Software draw in WebView is deprecated and only maintained for backward compatibility.
Software draw has many drawbacks compared to hardware-accelerated draws.
Hardware acceleration is enabled by default for all Android versions that supports Chromium WebView. However apps should avoid accidentally disabling hardware acceleration for WebView.
setLayerType(View.LAYER_TYPE_SOFTWARE)on WebView or any parent of WebView.
VirtualDisplay can be used to create a Presentation and the WebView can be attached to the Presentation. WebView will then render into the SurfaceTexture of the VirtualDisplay.
SurfaceTexture can be consumed as a texture in OpenGL which can then be readback into a Bitmap.
If you are disabling hardware acceleration to avoid crashes, then please file a bug at https://bugs.chromium.org/p/chromium/issues/entry?template=Webview+Bugs. Please include the apk of the app, exact steps to reproduce the crash, and the build fingerprint of the device. The fingerprint can be obtained with
adb shell getprop ro.build.fingerprint.