Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Issue 1408123005: Android Webview IPC-based sync compositing (Closed)

Created:
5 years, 2 months ago by boliu
Modified:
5 years, 1 month ago
CC:
android-webview-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, hush (inactive), jam, jdduke+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nona+watch_chromium.org, piman+watch_chromium.org, shuchen+watch_chromium.org, James Su, yusukes+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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}

Patch Set 1 #

Patch Set 2 : rebase #

Total comments: 20

Patch Set 3 : review #

Patch Set 4 : rebase #

Total comments: 26

Patch Set 5 : review #

Total comments: 13

Patch Set 6 : review3 #

Patch Set 7 : send FrameAct #

Total comments: 28

Patch Set 8 : dcheng review #

Total comments: 2

Patch Set 9 : for each #

Patch Set 10 : fix win compile #

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

Messages

Total messages: 42 (13 generated)
boliu
Alright. This is the big one! I tried to summarize the changes in the CL ...
5 years, 2 months ago (2015-10-21 00:09:33 UTC) #2
boliu
+dcheng for security/IPC. You watched my talk. Want to do the security review for this? ...
5 years, 2 months ago (2015-10-22 18:05:52 UTC) #4
dcheng
I'm pretty sure I don't really understand this patch yet, but here's some random thoughts ...
5 years, 1 month ago (2015-10-27 21:06:59 UTC) #5
boliu
No new patch set yet On 2015/10/27 21:06:59, dcheng wrote: > I'm pretty sure I ...
5 years, 1 month ago (2015-10-27 22:49:14 UTC) #8
boliu
https://codereview.chromium.org/1408123005/diff/20001/content/browser/android/synchronous_compositor_host.cc File content/browser/android/synchronous_compositor_host.cc (right): https://codereview.chromium.org/1408123005/diff/20001/content/browser/android/synchronous_compositor_host.cc#newcode67 content/browser/android/synchronous_compositor_host.cc:67: if (!frame->delegated_frame_data.get()) { On 2015/10/27 21:06:58, dcheng wrote: > ...
5 years, 1 month ago (2015-10-28 02:07:06 UTC) #9
no sievers
https://codereview.chromium.org/1408123005/diff/60001/content/browser/android/in_process/DEPS File content/browser/android/in_process/DEPS (right): https://codereview.chromium.org/1408123005/diff/60001/content/browser/android/in_process/DEPS#newcode6 content/browser/android/in_process/DEPS:6: # Include boliu@chromium.org on the review for any additions ...
5 years, 1 month ago (2015-10-29 01:37:01 UTC) #10
boliu
https://codereview.chromium.org/1408123005/diff/60001/content/browser/android/in_process/DEPS File content/browser/android/in_process/DEPS (right): https://codereview.chromium.org/1408123005/diff/60001/content/browser/android/in_process/DEPS#newcode6 content/browser/android/in_process/DEPS:6: # Include boliu@chromium.org on the review for any additions ...
5 years, 1 month ago (2015-10-29 04:24:44 UTC) #11
no sievers
https://codereview.chromium.org/1408123005/diff/80001/content/browser/android/in_process/OWNERS File content/browser/android/in_process/OWNERS (right): https://codereview.chromium.org/1408123005/diff/80001/content/browser/android/in_process/OWNERS#newcode4 content/browser/android/in_process/OWNERS:4: per-file DEPS=boliu@chromium.org you can never go on a vacation ...
5 years, 1 month ago (2015-11-03 00:41:30 UTC) #12
boliu
https://codereview.chromium.org/1408123005/diff/80001/content/browser/android/in_process/OWNERS File content/browser/android/in_process/OWNERS (right): https://codereview.chromium.org/1408123005/diff/80001/content/browser/android/in_process/OWNERS#newcode4 content/browser/android/in_process/OWNERS:4: per-file DEPS=boliu@chromium.org On 2015/11/03 00:41:30, sievers wrote: > you ...
5 years, 1 month ago (2015-11-03 01:39:57 UTC) #13
no sievers
https://codereview.chromium.org/1408123005/diff/80001/content/renderer/android/synchronous_compositor_proxy.cc File content/renderer/android/synchronous_compositor_proxy.cc (right): https://codereview.chromium.org/1408123005/diff/80001/content/renderer/android/synchronous_compositor_proxy.cc#newcode218 content/renderer/android/synchronous_compositor_proxy.cc:218: // TODO(boliu): mutable and swap? On 2015/11/03 01:39:57, boliu ...
5 years, 1 month ago (2015-11-03 18:08:28 UTC) #14
boliu
https://codereview.chromium.org/1408123005/diff/80001/content/renderer/android/synchronous_compositor_proxy.cc File content/renderer/android/synchronous_compositor_proxy.cc (right): https://codereview.chromium.org/1408123005/diff/80001/content/renderer/android/synchronous_compositor_proxy.cc#newcode218 content/renderer/android/synchronous_compositor_proxy.cc:218: // TODO(boliu): mutable and swap? On 2015/11/03 18:08:28, sievers ...
5 years, 1 month ago (2015-11-03 18:12:13 UTC) #15
boliu
https://codereview.chromium.org/1408123005/diff/80001/content/renderer/android/synchronous_compositor_proxy.cc File content/renderer/android/synchronous_compositor_proxy.cc (right): https://codereview.chromium.org/1408123005/diff/80001/content/renderer/android/synchronous_compositor_proxy.cc#newcode218 content/renderer/android/synchronous_compositor_proxy.cc:218: // TODO(boliu): mutable and swap? On 2015/11/03 18:12:12, boliu ...
5 years, 1 month ago (2015-11-03 18:25:09 UTC) #16
no sievers
lgtm
5 years, 1 month ago (2015-11-03 19:26:58 UTC) #17
dcheng
https://codereview.chromium.org/1408123005/diff/120001/content/browser/android/synchronous_compositor_host.cc File content/browser/android/synchronous_compositor_host.cc (right): https://codereview.chromium.org/1408123005/diff/120001/content/browser/android/synchronous_compositor_host.cc#newcode188 content/browser/android/synchronous_compositor_host.cc:188: if (!client_) How can client_ be null? It's unconditionally ...
5 years, 1 month ago (2015-11-04 09:47:41 UTC) #18
boliu
https://codereview.chromium.org/1408123005/diff/120001/content/browser/android/synchronous_compositor_host.cc File content/browser/android/synchronous_compositor_host.cc (right): https://codereview.chromium.org/1408123005/diff/120001/content/browser/android/synchronous_compositor_host.cc#newcode188 content/browser/android/synchronous_compositor_host.cc:188: if (!client_) On 2015/11/04 09:47:41, dcheng wrote: > How ...
5 years, 1 month ago (2015-11-04 16:52:05 UTC) #19
dcheng
lgtm https://codereview.chromium.org/1408123005/diff/140001/content/renderer/android/synchronous_compositor_proxy.cc File content/renderer/android/synchronous_compositor_proxy.cc (right): https://codereview.chromium.org/1408123005/diff/140001/content/renderer/android/synchronous_compositor_proxy.cc#newcode109 content/renderer/android/synchronous_compositor_proxy.cc:109: for (size_t i = 0; i < messages.size(); ...
5 years, 1 month ago (2015-11-04 18:24:29 UTC) #20
boliu
https://codereview.chromium.org/1408123005/diff/140001/content/renderer/android/synchronous_compositor_proxy.cc File content/renderer/android/synchronous_compositor_proxy.cc (right): https://codereview.chromium.org/1408123005/diff/140001/content/renderer/android/synchronous_compositor_proxy.cc#newcode109 content/renderer/android/synchronous_compositor_proxy.cc:109: for (size_t i = 0; i < messages.size(); ++i) ...
5 years, 1 month ago (2015-11-04 18:35:32 UTC) #21
boliu
Thanks both! :D
5 years, 1 month ago (2015-11-04 18:36:12 UTC) #22
boliu
+tsepez for ui/gfx/ipc/gfx_param_traits.cc Looks like the OWNERS file is interpreted as owned by tsepez@ only ...
5 years, 1 month ago (2015-11-04 18:53:57 UTC) #24
Tom Sepez
param traits LGTM.
5 years, 1 month ago (2015-11-04 19:49:43 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1408123005/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1408123005/160001
5 years, 1 month ago (2015-11-04 19:51:46 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/104292)
5 years, 1 month ago (2015-11-04 20:44:22 UTC) #30
boliu
On 2015/11/04 20:44:22, commit-bot: I haz the power wrote: > Try jobs failed on following ...
5 years, 1 month ago (2015-11-04 21:45:59 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1408123005/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1408123005/180001
5 years, 1 month ago (2015-11-04 23:13:36 UTC) #33
boliu
+danakj to stamp ui/gfx/ipc/gfx_ipc.gyp I don't know why this is suddenly needed now. But win_chromium_compile_dbg_ng ...
5 years, 1 month ago (2015-11-04 23:40:59 UTC) #35
danakj
On 2015/11/04 23:40:59, boliu wrote: > +danakj to stamp ui/gfx/ipc/gfx_ipc.gyp > > I don't know ...
5 years, 1 month ago (2015-11-04 23:51:54 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1408123005/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1408123005/180001
5 years, 1 month ago (2015-11-04 23:55:23 UTC) #40
commit-bot: I haz the power
Committed patchset #10 (id:180001)
5 years, 1 month ago (2015-11-05 00:53:01 UTC) #41
commit-bot: I haz the power
5 years, 1 month ago (2015-11-05 00:54:15 UTC) #42
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/bee541f46cb093523cc5736932e071573424d8de
Cr-Commit-Position: refs/heads/master@{#357955}

Powered by Google App Engine
This is Rietveld 408576698