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

Issue 2418383002: sync compositor: Signal async frame on IO thread (Closed)

Created:
4 years, 2 months ago by boliu
Modified:
4 years, 1 month ago
Reviewers:
Tobias Sargeant, dcheng, sky
CC:
chromium-reviews, jam, nasko+codewatch_chromium.org, darin-cc_chromium.org, android-webview-reviews_chromium.org, creis+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

sync compositor: Signal async frame on IO thread Continuation of CL by ojars@ here: https://codereview.chromium.org/2383933002/ Async hardware draw synchronously returns a frame future that is fulfilled asynchronously on the IO thread. This allows the frame future to be waited on either the UI thread or android's render thread without deadlocks. In content, make SynchronousCompositorObserver a true message filter owned by RenderProcessHostImpl. Will rename this to SCFilter in a later CL. In android_webview, wait on the frame future in kModeDraw, immediately before where the frame is needed, to maximize parallelization. Note that there is a hack in BVR to produce a synchronous frame first to ensure that bindings are initialized before render thread runs any code. This makes a complete more or less working path. But there are still lots of TODOs needs to be fixed before the async path is ready to ship. BUG=636164 Committed: https://crrev.com/c37cd75b3d77fb35953685c01df5adf1c744b55c Cr-Commit-Position: refs/heads/master@{#427096}

Patch Set 1 #

Patch Set 2 : content cleanups #

Patch Set 3 : more clean up and fixes #

Patch Set 4 : works maybe #

Patch Set 5 : test compile #

Patch Set 6 : crash fix maybe #

Patch Set 7 : fix filter lifetime #

Patch Set 8 : style #

Patch Set 9 : bad_message, and minor cleanups #

Total comments: 20

Patch Set 10 : dcheng review #

Total comments: 2

Patch Set 11 : typo #

Unified diffs Side-by-side diffs Delta from patch set Stats (+176 lines, -120 lines) Patch
M android_webview/browser/browser_view_renderer.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -3 lines 0 comments Download
M android_webview/browser/browser_view_renderer.cc View 1 2 3 4 5 6 7 8 9 3 chunks +14 lines, -28 lines 0 comments Download
M android_webview/browser/child_frame.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M android_webview/browser/hardware_renderer.h View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -0 lines 0 comments Download
M android_webview/browser/hardware_renderer.cc View 1 2 3 1 chunk +22 lines, -4 lines 0 comments Download
M android_webview/browser/render_thread_manager.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -1 line 0 comments Download
M android_webview/browser/render_thread_manager.cc View 1 2 3 2 chunks +8 lines, -4 lines 0 comments Download
M content/browser/android/synchronous_compositor_host.h View 1 2 3 4 5 6 2 chunks +2 lines, -3 lines 0 comments Download
M content/browser/android/synchronous_compositor_host.cc View 1 2 3 4 5 6 7 5 chunks +18 lines, -28 lines 0 comments Download
M content/browser/android/synchronous_compositor_observer.h View 1 2 3 4 5 6 7 8 9 4 chunks +21 lines, -10 lines 0 comments Download
M content/browser/android/synchronous_compositor_observer.cc View 1 2 3 4 5 6 7 8 9 2 chunks +55 lines, -27 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.h View 1 2 3 4 5 6 7 8 9 3 chunks +14 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/browser/android/synchronous_compositor.h View 1 1 chunk +2 lines, -4 lines 0 comments Download
M content/public/browser/android/synchronous_compositor_client.h View 1 2 1 chunk +0 lines, -4 lines 0 comments Download
M content/public/test/test_synchronous_compositor_android.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/public/test/test_synchronous_compositor_android.cc View 1 2 3 4 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 29 (17 generated)
boliu
ptal
4 years, 2 months ago (2016-10-17 22:06:45 UTC) #6
boliu
+dcheng to review IPC handling, so basically the changes to synchronous_compositor_observer.cc. so tl;dr is I'm ...
4 years, 2 months ago (2016-10-19 17:14:19 UTC) #10
dcheng
Seems reasonable though it's a bit abstract. https://codereview.chromium.org/2418383002/diff/160001/android_webview/browser/browser_view_renderer.cc File android_webview/browser/browser_view_renderer.cc (right): https://codereview.chromium.org/2418383002/diff/160001/android_webview/browser/browser_view_renderer.cc#newcode238 android_webview/browser/browser_view_renderer.cc:238: bool async ...
4 years, 2 months ago (2016-10-21 06:42:56 UTC) #11
boliu
thanks for the review! https://codereview.chromium.org/2418383002/diff/160001/android_webview/browser/browser_view_renderer.cc File android_webview/browser/browser_view_renderer.cc (right): https://codereview.chromium.org/2418383002/diff/160001/android_webview/browser/browser_view_renderer.cc#newcode238 android_webview/browser/browser_view_renderer.cc:238: bool async = async_on_draw_hardware_ && ...
4 years, 2 months ago (2016-10-21 15:15:32 UTC) #12
dcheng
lgtm from an ipc standpoint https://codereview.chromium.org/2418383002/diff/180001/android_webview/browser/browser_view_renderer.h File android_webview/browser/browser_view_renderer.h (right): https://codereview.chromium.org/2418383002/diff/180001/android_webview/browser/browser_view_renderer.h#newcode204 android_webview/browser/browser_view_renderer.h:204: // Must do a ...
4 years, 2 months ago (2016-10-21 22:20:12 UTC) #13
boliu
https://codereview.chromium.org/2418383002/diff/180001/android_webview/browser/browser_view_renderer.h File android_webview/browser/browser_view_renderer.h (right): https://codereview.chromium.org/2418383002/diff/180001/android_webview/browser/browser_view_renderer.h#newcode204 android_webview/browser/browser_view_renderer.h:204: // Must do a synchronous draw first to ensure ...
4 years, 1 month ago (2016-10-24 15:57:23 UTC) #16
boliu
toby already verbally approved, but went on vacation without actually approving. I own pretty much ...
4 years, 1 month ago (2016-10-24 16:09:46 UTC) #18
sky
content/public/test LGTM
4 years, 1 month ago (2016-10-24 16:40:46 UTC) #19
Tobias Sargeant
LGTM
4 years, 1 month ago (2016-10-24 16:45:35 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2418383002/200001
4 years, 1 month ago (2016-10-24 17:02:06 UTC) #25
commit-bot: I haz the power
Committed patchset #11 (id:200001)
4 years, 1 month ago (2016-10-24 17:55:09 UTC) #27
commit-bot: I haz the power
4 years, 1 month ago (2016-10-24 18:22:39 UTC) #29
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/c37cd75b3d77fb35953685c01df5adf1c744b55c
Cr-Commit-Position: refs/heads/master@{#427096}

Powered by Google App Engine
This is Rietveld 408576698