title: Workaround for bug on Chromium WebView about high load causing partial rendering on canvas
body: <p>I found <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=1274482" rel="noreferrer">[1]</a> this issue on newest WebView of Chrome. To produce it you need three things:</p>
  <ol>
  <li>You have updated WebView to version from 15.11.2021</li>
  <li>HardwareAcceleration in AndroidManifest is set true</li>
  <li>When you heavily give stuff to render for webview, you start to see missing content on screen.</li>
  </ol>
  <p>My technology stack uses a Openlayers map inside app that is actually a small website packed with Cordova, which is the component that uses the WebView.</p>
  <p>By heavy use I mean the map has to have many layers of map data on for rendering and I have to make some maneavours moving the map and making it to start loading next rendered content before the previous one is completed.</p>
  <p>At first time I open the map after installation, the map works ok with heavy load. Issue starts when I kill the app and login again and make the heavy movements when the app tries to render the first time. After that the map does not render content as a whole, some tiles and map menus come only partially.</p>
  <p>The behavior continues even when I click off some map layers, and when there is very little of them anymore, the issue settles down. Interesting point is also, there is no single point where the load is enough to trigger the issue or settle down, at least the point is different going to each direction.</p>
  <p>There is a warning message, that comes to logcat only when the issue is present:</p>
  <blockquote>
  <p>chromium: [ERROR:tile_manager.cc(821)] WARNING: tile memory limits exceeded, some content may not draw</p>
  </blockquote>
  <p>and I can observe it to be coming along same lines the 15.11.2021 version update has removed some &quot;useless data&quot; <a href="https://chromium.googlesource.com/chromium/src/+/a0994781ea666d9b630b6478206ac429ed8444d1%5E%21/#F0" rel="noreferrer">[2]</a>. I am not 100% sure if these two things are related, but I have realized the versions before that particular update work just fine with my app (I removed updates from WebView in Google Play).</p>
  <p>There are currently three workarounds:</p>
  <ol>
  <li>Do not use map layers that are too heavy and trigger the issue (makes bad for our app user experience by hiding crucial information from user)</li>
  <li>Remove webview updates from PlayStore (I personally tested that, overnight the system updated the broken version back, hard to communicate to end users).</li>
  <li>Not to use hardware acceleration. (Other parts of the app get useless, too slow behavior makes end users angry).</li>
  </ol>
  <p>As you observe none of these is working well. I believe that this same behavior is seen by other WebView heavy users too, so I opened this question with only one main question:</p>
  <p><strong>Meanwhile my bug report is advancing in Google, what could I do meanwhile to overcome the issue?</strong></p>
  <hr />
  <p><strong>Sources:</strong></p>
  <p>[1] <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=1274482" rel="noreferrer">https://bugs.chromium.org/p/chromium/issues/detail?id=1274482</a></p>
  <p>[2] <a href="https://chromium.googlesource.com/chromium/src/+/a0994781ea666d9b630b6478206ac429ed8444d1%5E%21/#F0" rel="noreferrer">https://chromium.googlesource.com/chromium/src/+/a0994781ea666d9b630b6478206ac429ed8444d1%5E%21/#F0</a></p>