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

Issue 1673783004: Hook up BeginFrameSource to SurfaceFactoryClient via SurfaceManager (Closed)

Created:
4 years, 10 months ago by enne (OOO)
Modified:
4 years, 9 months ago
CC:
android-webview-reviews_chromium.org, brianderson, cc-bugs_chromium.org, chromium-reviews, creis+watch_chromium.org, danakj+watch_chromium.org, darin-cc_chromium.org, jam, jbauman+watch_chromium.org, kalyank, miu+watch_chromium.org, nasko+codewatch_chromium.org, nona+watch_chromium.org, piman+watch_chromium.org, rjkroege, shuchen+watch_chromium.org, sievers+watch_chromium.org, sunnyps, 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

Hook up BeginFrameSource to SurfaceFactoryClient via SurfaceManager SurfaceManager now maintains a dag of surface id namespaces. Optionally, a single BeginFrameSource input can be attached to a single namespace node. Every namespace node also has a SurfaceFactoryClient. This client is informed of a current BeginFrameSource, which is chosen from any BeginFrameSource attached to it or a parent of that node. Any children of that namespace also are able to use that source. SurfaceManager is responsible for picking which source to use, of which it currently just picks the first one until that source goes is removed after which it arbitrarily picks another valid one. In practice, this means that a window moved to another display in ChromeOS will switch its BeginFrameSource after the window is dropped onto the new window. Because the users of this dag all have very different requirements, the ordering of SurfaceFactoryClient registration, namespace hierarchy registration, and BeginFrameSource attaching are not particularly strict. BeginFrameSources, SurfaceFactoryClients, and hierarchies can be registered and unregistered in any order with respect to each other. BUG=401331 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/4e3c9d5b507f8a7cfb99ef3cc855184943a1dbd8 Cr-Commit-Position: refs/heads/master@{#379988}

Patch Set 1 #

Patch Set 2 : Now with unittests #

Total comments: 11

Patch Set 3 : More testing #

Patch Set 4 : Rebase;compile errors #

Patch Set 5 : More compile fixes #

Patch Set 6 : compile #

Patch Set 7 : compile #

Total comments: 2

Patch Set 8 : sky review #

Patch Set 9 : Fix HasAnySurface;register id namespace correctly #

Patch Set 10 : Fix mus unit tests #

Total comments: 4

Patch Set 11 : Rebase #

Patch Set 12 : Register id namespace on Android #

Unified diffs Side-by-side diffs Delta from patch set Stats (+785 lines, -606 lines) Patch
M android_webview/browser/hardware_renderer.h View 1 chunk +1 line, -2 lines 0 comments Download
M android_webview/browser/hardware_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +5 lines, -1 line 0 comments Download
M cc/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M cc/cc_tests.gyp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M cc/surfaces/display.h View 2 chunks +0 lines, -5 lines 0 comments Download
M cc/surfaces/display.cc View 1 2 3 3 chunks +3 lines, -27 lines 0 comments Download
M cc/surfaces/display_unittest.cc View 1 2 3 2 chunks +1 line, -25 lines 0 comments Download
M cc/surfaces/surface.h View 1 chunk +0 lines, -4 lines 0 comments Download
M cc/surfaces/surface.cc View 2 chunks +0 lines, -31 lines 0 comments Download
M cc/surfaces/surface_aggregator.h View 1 2 2 chunks +1 line, -11 lines 0 comments Download
M cc/surfaces/surface_aggregator.cc View 1 2 2 chunks +2 lines, -14 lines 0 comments Download
M cc/surfaces/surface_aggregator_perftest.cc View 3 chunks +2 lines, -11 lines 0 comments Download
M cc/surfaces/surface_aggregator_unittest.cc View 54 chunks +5 lines, -257 lines 0 comments Download
M cc/surfaces/surface_display_output_surface.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M cc/surfaces/surface_display_output_surface.cc View 1 2 4 chunks +15 lines, -2 lines 0 comments Download
M cc/surfaces/surface_display_output_surface_unittest.cc View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M cc/surfaces/surface_factory.h View 1 chunk +0 lines, -3 lines 0 comments Download
M cc/surfaces/surface_factory.cc View 1 2 chunks +0 lines, -6 lines 0 comments Download
M cc/surfaces/surface_factory_client.h View 1 chunk +2 lines, -8 lines 0 comments Download
M cc/surfaces/surface_factory_unittest.cc View 2 chunks +1 line, -33 lines 0 comments Download
M cc/surfaces/surface_manager.h View 1 2 3 chunks +61 lines, -0 lines 0 comments Download
M cc/surfaces/surface_manager.cc View 1 2 4 chunks +200 lines, -1 line 0 comments Download
A cc/surfaces/surface_manager_unittest.cc View 1 2 1 chunk +382 lines, -0 lines 0 comments Download
M cc/surfaces/surface_unittest.cc View 2 chunks +1 line, -108 lines 0 comments Download
M cc/surfaces/surfaces_pixeltest.cc View 4 chunks +4 lines, -17 lines 0 comments Download
M cc/test/surface_hittest_test_helpers.h View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M components/mus/surfaces/top_level_display_client.h View 1 2 1 chunk +1 line, -2 lines 0 comments Download
M components/mus/surfaces/top_level_display_client.cc View 1 2 1 chunk +0 lines, -1 line 0 comments Download
M components/mus/ws/server_window_surface.h View 3 chunks +6 lines, -2 lines 0 comments Download
M components/mus/ws/server_window_surface.cc View 1 2 3 4 5 6 7 8 4 chunks +15 lines, -7 lines 0 comments Download
M components/mus/ws/server_window_surface_manager.h View 1 2 3 1 chunk +6 lines, -2 lines 0 comments Download
M components/mus/ws/server_window_surface_manager.cc View 1 2 3 4 5 6 7 8 4 chunks +28 lines, -4 lines 0 comments Download
M components/mus/ws/test_server_window_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M components/mus/ws/test_server_window_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -2 lines 0 comments Download
M components/mus/ws/window_finder_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M components/mus/ws/window_tree_unittest.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +5 lines, -3 lines 0 comments Download
M content/browser/compositor/delegated_frame_host.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -2 lines 0 comments Download
M content/browser/compositor/delegated_frame_host.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +21 lines, -4 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 80 (38 generated)
enne (OOO)
Wanted to send this out and get some initial feedback. Lots of files are changed ...
4 years, 10 months ago (2016-02-12 22:53:10 UTC) #7
brianderson
Haven't looked at it all, but it's looking good. All comments I left are just ...
4 years, 10 months ago (2016-02-18 23:01:08 UTC) #9
enne (OOO)
https://codereview.chromium.org/1673783004/diff/20001/cc/surfaces/surface_manager.h File cc/surfaces/surface_manager.h (right): https://codereview.chromium.org/1673783004/diff/20001/cc/surfaces/surface_manager.h#newcode78 cc/surfaces/surface_manager.h:78: void RegisterSurfaceFactoryClient(uint32_t id_namespace, On 2016/02/18 at 23:01:07, brianderson wrote: ...
4 years, 10 months ago (2016-02-19 21:26:57 UTC) #10
jbauman
Sorry my review is so late. This lgtm with Brian's comments addressed. https://codereview.chromium.org/1673783004/diff/20001/cc/surfaces/surface_manager.cc File cc/surfaces/surface_manager.cc ...
4 years, 10 months ago (2016-02-24 19:52:34 UTC) #11
enne (OOO)
On 2016/02/24 at 19:52:34, jbauman wrote: > Sorry my review is so late. This lgtm ...
4 years, 10 months ago (2016-02-24 21:19:03 UTC) #12
enne (OOO)
* addressed brianderson's comments * added a recursion check * renamed api to all be ...
4 years, 10 months ago (2016-02-25 23:45:17 UTC) #14
enne (OOO)
If you don't mind taking one more look, I'd appreciate it. :)
4 years, 10 months ago (2016-02-25 23:45:32 UTC) #15
jbauman
Great! lgtm.
4 years, 10 months ago (2016-02-26 23:58:49 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1673783004/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1673783004/40001
4 years, 10 months ago (2016-02-27 00:02:56 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/122479) chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, ...
4 years, 10 months ago (2016-02-27 00:19:11 UTC) #20
enne (OOO)
OWNERS: erg: components/mus/surfaces/top_level_display_client.cc components/mus/surfaces/top_level_display_client.h components/mus/ws/server_window_surface.cc components/mus/ws/server_window_surface.h components/mus/ws/server_window_surface_manager.cc components/mus/ws/server_window_surface_manager.h sievers: content/browser/compositor/delegated_frame_host.cc content/browser/compositor/delegated_frame_host.h content/browser/frame_host/render_widget_host_view_child_frame.cc content/browser/frame_host/render_widget_host_view_child_frame.h content/browser/renderer_host/render_widget_host_view_android.cc content/browser/renderer_host/render_widget_host_view_android.h ...
4 years, 9 months ago (2016-02-29 19:59:40 UTC) #22
no sievers
lgtm
4 years, 9 months ago (2016-02-29 20:23:18 UTC) #23
Elliot Glaysher
On 2016/02/29 19:59:40, enne wrote: > OWNERS: > > erg: > components/mus/surfaces/top_level_display_client.cc > components/mus/surfaces/top_level_display_client.h > ...
4 years, 9 months ago (2016-02-29 20:28:59 UTC) #26
boliu
rs lgtm % compile
4 years, 9 months ago (2016-02-29 20:45:48 UTC) #27
sky
https://codereview.chromium.org/1673783004/diff/120001/components/mus/ws/server_window_surface.cc File components/mus/ws/server_window_surface.cc (right): https://codereview.chromium.org/1673783004/diff/120001/components/mus/ws/server_window_surface.cc#newcode49 components/mus/ws/server_window_surface.cc:49: cc::SurfaceManager* manager = manager_->GetSurfaceManager(); manager_ might already be through ...
4 years, 9 months ago (2016-03-01 03:41:44 UTC) #28
enne (OOO)
https://codereview.chromium.org/1673783004/diff/120001/components/mus/ws/server_window_surface.cc File components/mus/ws/server_window_surface.cc (right): https://codereview.chromium.org/1673783004/diff/120001/components/mus/ws/server_window_surface.cc#newcode49 components/mus/ws/server_window_surface.cc:49: cc::SurfaceManager* manager = manager_->GetSurfaceManager(); On 2016/03/01 at 03:41:44, sky ...
4 years, 9 months ago (2016-03-01 22:20:33 UTC) #29
sky
LGTM
4 years, 9 months ago (2016-03-02 00:23:53 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1673783004/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1673783004/160001
4 years, 9 months ago (2016-03-02 19:04:51 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1673783004/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1673783004/160001
4 years, 9 months ago (2016-03-02 19:05:45 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/190442) win8_chromium_ng on tryserver.chromium.win (JOB_FAILED, ...
4 years, 9 months ago (2016-03-02 19:45:29 UTC) #39
enne (OOO)
sky, sorry but I had a couple of mus unit tests failures I didn't see ...
4 years, 9 months ago (2016-03-02 22:04:40 UTC) #40
sky
SLGTM https://codereview.chromium.org/1673783004/diff/180001/components/mus/ws/test_server_window_delegate.cc File components/mus/ws/test_server_window_delegate.cc (right): https://codereview.chromium.org/1673783004/diff/180001/components/mus/ws/test_server_window_delegate.cc#newcode14 components/mus/ws/test_server_window_delegate.cc:14: : root_window_(nullptr), surfaces_state_(new SurfacesState()) {} On 2016/03/02 22:04:40, ...
4 years, 9 months ago (2016-03-02 23:45:35 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1673783004/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1673783004/180001
4 years, 9 months ago (2016-03-03 01:19:14 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/189549)
4 years, 9 months ago (2016-03-03 02:07:43 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1673783004/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1673783004/180001
4 years, 9 months ago (2016-03-03 18:47:24 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/33018)
4 years, 9 months ago (2016-03-03 22:40:38 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1673783004/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1673783004/180001
4 years, 9 months ago (2016-03-03 22:41:54 UTC) #52
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/140144)
4 years, 9 months ago (2016-03-04 01:26:31 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1673783004/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1673783004/180001
4 years, 9 months ago (2016-03-04 01:31:38 UTC) #56
commit-bot: I haz the power
Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/140147) ios_rel_device_ninja on tryserver.chromium.mac (JOB_FAILED, ...
4 years, 9 months ago (2016-03-04 01:35:48 UTC) #58
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1673783004/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1673783004/200001
4 years, 9 months ago (2016-03-04 19:43:42 UTC) #61
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/178153)
4 years, 9 months ago (2016-03-04 21:11:43 UTC) #63
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1673783004/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1673783004/200001
4 years, 9 months ago (2016-03-04 21:23:43 UTC) #65
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/33707)
4 years, 9 months ago (2016-03-04 23:36:28 UTC) #67
boliu
On 2016/03/04 23:36:28, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years, 9 months ago (2016-03-05 00:42:23 UTC) #68
enne (OOO)
Thanks for that. I had misremembered this passing on a previous run and thought it ...
4 years, 9 months ago (2016-03-07 18:59:38 UTC) #71
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1673783004/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1673783004/220001
4 years, 9 months ago (2016-03-07 18:59:41 UTC) #72
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/185090)
4 years, 9 months ago (2016-03-07 20:53:44 UTC) #74
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1673783004/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1673783004/220001
4 years, 9 months ago (2016-03-08 22:27:10 UTC) #76
enne (OOO)
android bot still failed, but it looked like it couldn't dismiss a popup? I verified ...
4 years, 9 months ago (2016-03-08 22:27:17 UTC) #77
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 9 months ago (2016-03-09 00:25:22 UTC) #78
commit-bot: I haz the power
4 years, 9 months ago (2016-03-09 00:26:21 UTC) #80
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/4e3c9d5b507f8a7cfb99ef3cc855184943a1dbd8
Cr-Commit-Position: refs/heads/master@{#379988}

Powered by Google App Engine
This is Rietveld 408576698