title: How to fix GPU rendering Bug in Android M
body: <p>My application works well in Android L and all other Android versions, but in Android M preview, it has a lot of pauses during the scrolling of the WebView.</p>
  
  <p>Here are the pictures of Profile GPU rendering in Android L and Android M preview.</p>
  
  <p><img src="https://i.stack.imgur.com/JrPo0.png" alt="Profile GPU rendering in Android L"></p>
  
  <p><img src="https://i.stack.imgur.com/IFGaB.png" alt="Profile GPU rendering in Android M"></p>
  
  <p>From these pictures, you can see Android L run every frame in about 16ms, but Android M run every frame more than 120 ms.</p>
  
  <p>I think the problem maybe in the code<br>
      mWebView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);</p>
  
  <p>if I remove this code, It works fine in Android M.
  but it doesn't work well in Android 4.0.4</p>
  
  <p>How could I fix this bug, Will Android M fix this ?</p>