如何在Android M中修复GPU渲染Bug

时间:2015-07-16 16:57:41

标签: android android-6.0-marshmallow

我的应用程序在Android L和所有其他Android版本中运行良好,但在Android M预览中,在滚动WebView时会有很多暂停。

以下是Android L和Android M预览中配置文件GPU渲染的图片。

Profile GPU rendering in Android L

Profile GPU rendering in Android M

从这些图片中,您可以看到Android L在大约16毫秒内每帧运行,但Android M每帧运行超过120毫秒。

我认为问题可能在代码中     mWebView.setLayerType(View.LAYER_TYPE_SOFTWARE,null);

如果我删除此代码,它在Android M中运行正常。 但它在Android 4.0.4中效果不佳

我怎么能修复这个错误,Android M会解决这个问题吗?

0 个答案:

没有答案