机器人的WebView硬件加速人工制品解决方法解决方法、机器人、制品、硬件加速

2023-09-05 07:00:27 作者:处处留情.

因此​​,有与WebView功能的硬件加速Android的一个已知的bug, 看到这里,例如:https://$c$c.google.com/p/android/issues/detail?id=17352

So there's a known bug with WebView hardware acceleration in Android, see here for example: https://code.google.com/p/android/issues/detail?id=17352

禁用硬件加速是不是我的选择。

Disabling hardware acceleration is not an option for me.

我读过这些伟大的参考文献:

I've read these great references:

的Andr​​oid的WebView慢 https://plus.google.com/+PaulIrish/posts/ccP98BTMd5Z http://riamobilesolutions.com/android-webview-scrolling-performance/ Android webview slow https://plus.google.com/+PaulIrish/posts/ccP98BTMd5Z http://riamobilesolutions.com/android-webview-scrolling-performance/

我的问题是,鉴于HWA开启时,没有人知道任何CSS / HTML解决方法prevent渲染文物可能发生?

My question is, given HWA is turned on, does anyone know any CSS/HTML workarounds to prevent the rendering artefacts that can occur?

我只看到他们的时候,我给焦点表单域,它似乎会导致垂直同步式的和子像素gitches。当我专注的领域,整个页面看起来抖动。

I'm only seeing them when I give focus to a form field, it seems to cause vsync-esque and subpixel gitches. When I focus the field, the whole page seems to jitter.

这似乎位置:绝对有事情做这个,太

It seems position: absolute has something to do with this, too.

任何人有解决这个方面的经验?

Anyone got any experience solving this?

推荐答案

补充:

-webkit-backface-visibility: hidden;
-webkit-perspective: 1000;
backface-visibility: hidden;
perspective: 1000;

如果你使用3D转换的工作。它是一种廉价的伎俩,但它会提高性能espacially iPad上..

if you working with 3d transform.. it is a cheap trick BUT it will improve the performance espacially on iPad..

此外,你还可以尝试

-webkit-transform: rotateZ(0deg);

AFAIK旋转可以提高性能,因为gpu's在旋转的东西好多了。

AFAIK rotations can boost the performance because gpu´s are much better in rotating something..

另一种方法是,放下一个无功能转型屏幕上的每个元素。

another way is to lay down an 'without function' transformation on each element on the screen..

请让我知道如果我可以帮你。

please let me know if i could help you.

 
精彩推荐
图片推荐