*
Android Chromium WebView
WebView version historyAndroid <= J: custom WebKit-based “classic” WebViewAndroid K: Chromium 30/33-based WebViewAndroid L: Unbundled evergreen WebView, autoupdated via
Play Services
Organization of code
android.webkit.WebView
WebViewProvider
Chromium source tree
AwContents
ContentViewCore
“glue layer”
Android source tree
Rendering engine
MyWebViewApp
Android framework
android_webview/
Chromium content layer
How Rendering Work
rendering occurs in two phases: paint, composite.
painting is the population of layers’ backings (bitmaps with software rasterization; textures in hardware rasterization).
drawing is the compositor combining layers into the final screen image;
渲染过程
Threading model summaryChromeMulti-process UI thread GPU thread Texture upload thread Per renderer process:
o Blink threado CC impl threado Raster thread
WebViewSingle-process Combined UI + renderer CC
thread Android RenderThread (+in-
process GPU thread) Canvas/WebGL GPU thread Blink thread Raster thread
Blink进展 Binding Team
Layout Team
Memory Team。 BlinkAllocator; Oilpan( Oilpan is a project to replace reference counting in Blink with a GC)
Paint Team。 Slimming Paint (Redesigning Painting and Compositing)
Style Team
Web Components Team
Animation Team
结论 UI线程很忙。 IO操作、 cpu密集操作不要放在 UI线程执行,开发中尽量减轻 UI的负担。 WebView有内存泄漏的问题。 硬件加速速度更快,但消耗更多内存,开发中需要考虑性能和内存的平衡。 WebView放在单独的进程运行。 WebView的性能在不断提高。
https://www.chromium.org/developers/design-documents
http://www.ituring.com.cn/minibook/705
http://blog.csdn.net/hongbomin?viewmode=contents
http://blog.csdn.net/Luoshengyang
Top Related