GoogleAndroid官方文档中对WebView介绍如下:
In order to support inline HTML5 video in your application you need to have hardware acceleration turned on.
所以安卓要开启硬件加速只需要在清单文件或者WebViewActivity中配置即可:
四种级别:
Activity级别:
Window级别:getWindow().setFlags(
WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED,
WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED);
View级别:
mView.setLayerType(View.LAYER_TYPE_HARDWARE, null);