|
|
Android Webview IPC-based sync compositing
Existing browser-renderer call path uses
SynchronousCompositorImpl to cross the logical process boundary:
[BrowserViewRenderer, RenderWidgetHostViewAndroid]
<-> SynchronousCompositorImpl <->
[SynchronousCompositorOutputSurface,
SynchronousCompositorExternalBeginFrameSource]
New call path, added behind kIPCSyncCompositing switch essentially
replaces SynchronousCompositorImpl with actual IPC code. New call
path looks like this:
[BrowserViewRenderer, RenderWidgetHostViewAndroid]
<-> SynchronousCompositorHost <-> IPC
<-> SynchronousCompositorFilter
<-> SynchronousCompositorProxy <->
[SynchronousCompositorOutputSurface,
SynchronousCompositorExternalBeginFrameSource]
Browser side:
Introduce SynchronousCompositorBase which adds methods used by RWHVA.
Add SynchronousCompositorHost which instead of calling to renderer
directly, uses sync IPCs instead.
Renderer side:
Add SynchronousCompositorFilter which is responsible for filtering sync
compositing messages and sending them to compositor thread. The filter
doubles as the SynchronousCompositorRegistry implementation. Filter is
owned by RenderThreadImpl so should outlive all other objects and the
compositor thread itself.
Add SynchronousCompositorProxy. This takes the place of
SynchronousCompositorImpl for the single-process path; the proxy is the
client for OutputSurface and BeginFrameSource. Proxy also receives sync
IPC from SynchronousCompositorHost and send replies and async IPCs back.
Proxy is used on the compositor thread only. Proxy lifetime is
controlled by the filter (registry) and is outlived by both
OutputSurface and BeginFrameSource so life time management is simple.
OutputSurface and BeginFrameSource are re-used.
IPCs:
There are common browser and renderer states that are sent on each
message from and to browser side. There is a versioning system for the
renderer state since messages may arrive out of order on the browser side.
BUG= 526842
Committed: https://crrev.com/bee541f46cb093523cc5736932e071573424d8de
Cr-Commit-Position: refs/heads/master@{#357955}
Total comments: 20
Total comments: 26
Total comments: 13
Total comments: 28
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1506 lines, -109 lines) |
Patch |
 |
M |
android_webview/native/aw_contents.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+2 lines, -7 lines |
0 comments
|
Download
|
 |
A |
content/browser/android/DEPS
|
View
|
|
1 chunk |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/browser/android/in_process/DEPS
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
content/browser/android/in_process/synchronous_compositor_factory_impl.h
|
View
|
|
2 chunks |
+1 line, -3 lines |
0 comments
|
Download
|
 |
M |
content/browser/android/in_process/synchronous_compositor_factory_impl.cc
|
View
|
|
2 chunks |
+0 lines, -8 lines |
0 comments
|
Download
|
 |
M |
content/browser/android/in_process/synchronous_compositor_impl.h
|
View
|
1
2
3
|
6 chunks |
+13 lines, -17 lines |
0 comments
|
Download
|
 |
M |
content/browser/android/in_process/synchronous_compositor_impl.cc
|
View
|
1
2
3
4
|
7 chunks |
+9 lines, -38 lines |
0 comments
|
Download
|
 |
A |
content/browser/android/synchronous_compositor_base.h
|
View
|
|
1 chunk |
+45 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/browser/android/synchronous_compositor_base.cc
|
View
|
1
2
|
1 chunk |
+77 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/browser/android/synchronous_compositor_host.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+84 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/browser/android/synchronous_compositor_host.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+214 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/render_widget_host_view_android.h
|
View
|
1
2
3
4
5
6
|
4 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/browser/renderer_host/render_widget_host_view_android.cc
|
View
|
1
2
3
4
5
6
7
|
6 chunks |
+16 lines, -4 lines |
0 comments
|
Download
|
 |
M |
content/common/android/OWNERS
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+38 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/common/android/sync_compositor_messages.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+127 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/common/android/sync_compositor_messages.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+44 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/common/content_message_generator.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
content/common/content_param_traits_macros.h
|
View
|
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/common/input_messages.h
|
View
|
|
1 chunk |
+0 lines, -2 lines |
0 comments
|
Download
|
 |
M |
content/content_browser.gypi
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/content_common.gypi
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/content_renderer.gypi
|
View
|
1
2
3
4
5
|
2 chunks |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/android/synchronous_compositor_factory.cc
|
View
|
|
2 chunks |
+0 lines, -7 lines |
0 comments
|
Download
|
 |
A |
content/renderer/android/synchronous_compositor_filter.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+107 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/renderer/android/synchronous_compositor_filter.cc
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+249 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/renderer/android/synchronous_compositor_proxy.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+124 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/renderer/android/synchronous_compositor_proxy.cc
|
View
|
1
2
3
4
5
6
7
8
|
1 chunk |
+226 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/renderer/gpu/render_widget_compositor.cc
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+10 lines, -9 lines |
0 comments
|
Download
|
 |
M |
content/renderer/input/input_handler_manager_client.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
content/renderer/render_thread_impl.h
|
View
|
1
2
3
4
5
6
7
|
3 chunks |
+12 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/renderer/render_thread_impl.cc
|
View
|
1
2
3
4
5
6
7
|
5 chunks |
+33 lines, -7 lines |
0 comments
|
Download
|
 |
M |
content/renderer/render_widget.cc
|
View
|
1
2
3
4
5
|
3 chunks |
+11 lines, -1 line |
0 comments
|
Download
|
 |
M |
ipc/ipc_message_start.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
ui/gfx/ipc/gfx_ipc.gyp
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
ui/gfx/ipc/gfx_param_traits.h
|
View
|
1
2
|
2 chunks |
+9 lines, -0 lines |
0 comments
|
Download
|
 |
M |
ui/gfx/ipc/gfx_param_traits.cc
|
View
|
1
2
|
2 chunks |
+28 lines, -0 lines |
0 comments
|
Download
|
Total messages: 42 (13 generated)
|