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

Issue 2527283003: cc: Introduce BeginFrame sequence numbers and acknowledgements.

Created:
4 years ago by Eric Seckler
Modified:
4 years ago
Reviewers:
brianderson, Sami
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, shuchen+watch_chromium.org, nasko+codewatch_chromium.org, yzshen+watch_chromium.org, nyquist+watch-blimp_chromium.org, kmarshall+watch-blimp_chromium.org, shaktisahu+watch-blimp_chromium.org, miu+watch_chromium.org, maniscalco+watch-blimp_chromium.org, perumaal+watch-blimp_chromium.org, bgoldman+watch-blimp_chromium.org, gcasto+watch-blimp_chromium.org, abarth-chromium, jbauman+watch_chromium.org, nona+watch_chromium.org, marcinjb+watch-blimp_chromium.org, darin-cc_chromium.org, lethalantidote+watch-blimp_chromium.org, kalyank, xjz+watch_chromium.org, scf+watch-blimp_chromium.org, yusukes+watch_chromium.org, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, danakj+watch_chromium.org, piman+watch_chromium.org, James Su, cc-bugs_chromium.org, khushalsagar+watch-blimp_chromium.org, rjkroege, anandc+watch-blimp_chromium.org, sriramsr+watch-blimp_chromium.org, Ian Vollick, steimel+watch-blimp_chromium.org, Aaron Boodman, darin (slow to review), dtrainor+watch-blimp_chromium.org, scheduler-bugs_chromium.org, enne (OOO), Sami, sunnyps
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Introduce BeginFrame sequence numbers and acknowledgements. This patch modifies the existing BeginFrameSource::DidFinishFrame() into a more robust acknowledgment mechanism, through which observers indicate the results of a BeginFrame message. For this purpose, each BeginFrame is identified through a source identifier and sequence number. The acknowledgments are used by the DisplayScheduler to determine when all updates for a BeginFrame have been received and trigger an early deadline. This replaces the DisplayScheduler's original heuristics for expected Surface damage. A BeginFrame acknowledgment indicates: 1) completion of a specific BeginFrame by the observer, 2) whether or not the observer produced updates, and 3) the oldest frame that was incorporated into the last update from the observer. 2) and 3) are in preparation for DevTool's BeginFrameControl, see http://bit.ly/bfc-v1 and https://codereview.chromium.org/2411793008/. The patch also updates BeginFrameObservers to reliably call DidFinishFrame and adds missing acknowledgment paths between renderer, browser, and services. Further, it wires up the compositor's BeginFrameSource on Android to RWHVAndroid, making it a BeginFrameObserver. Compositor-less Android WebView is supported by moving the BeginFrameSource from CompositorImpl up into WindowAndroid. DO NOT SUBMIT: Tests missing, DisplaySchedulerTest needs updating. BUG=646774, 401331 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Patch Set 1 : . #

Total comments: 50

Patch Set 2 : Address Sami's comments, DisplayScheduler observes while BFSObservers exist. #

Total comments: 14

Patch Set 3 : Rename to has_damages / latest_confirmed_frame, address Sami's comments. #

Patch Set 4 : Hook up MusBrowserCompositorOutputSurface's BeginFrameSource. #

Total comments: 13

Patch Set 5 : Address Brian's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2334 lines, -885 lines) Patch
M android_webview/browser/surfaces_instance.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M blimp/client/support/compositor/blimp_embedder_compositor.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/blimp/layer_tree_host_remote.h View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M cc/blimp/layer_tree_host_remote.cc View 1 2 2 chunks +3 lines, -2 lines 0 comments Download
M cc/ipc/begin_frame_args.mojom View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M cc/ipc/begin_frame_args.typemap View 1 chunk +7 lines, -2 lines 0 comments Download
M cc/ipc/begin_frame_args_struct_traits.h View 1 2 3 4 3 chunks +43 lines, -0 lines 0 comments Download
M cc/ipc/cc_param_traits_macros.h View 1 2 3 4 2 chunks +13 lines, -0 lines 0 comments Download
M cc/ipc/mojo_compositor_frame_sink.mojom View 1 1 chunk +4 lines, -0 lines 0 comments Download
M cc/output/begin_frame_args.h View 1 2 3 4 5 chunks +69 lines, -1 line 0 comments Download
M cc/output/begin_frame_args.cc View 1 2 3 4 4 chunks +42 lines, -7 lines 0 comments Download
M cc/output/begin_frame_args_unittest.cc View 1 2 3 chunks +42 lines, -17 lines 0 comments Download
M cc/output/compositor_frame_metadata.h View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M cc/output/direct_renderer.h View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M cc/output/gl_renderer.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M cc/output/gl_renderer.cc View 1 2 3 4 2 chunks +1 line, -3 lines 0 comments Download
M cc/output/gl_renderer_unittest.cc View 1 2 3 3 chunks +3 lines, -2 lines 0 comments Download
M cc/output/output_surface_frame.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M cc/output/overlay_unittest.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M cc/output/software_renderer.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M cc/output/software_renderer.cc View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M cc/output/vulkan_renderer.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M cc/output/vulkan_renderer.cc View 1 2 3 1 chunk +1 line, -3 lines 0 comments Download
M cc/scheduler/begin_frame_source.h View 1 2 3 4 9 chunks +98 lines, -12 lines 0 comments Download
M cc/scheduler/begin_frame_source.cc View 1 2 3 4 12 chunks +239 lines, -28 lines 0 comments Download
M cc/scheduler/begin_frame_source_unittest.cc View 1 2 21 chunks +165 lines, -89 lines 0 comments Download
M cc/scheduler/scheduler.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M cc/scheduler/scheduler.cc View 1 2 6 chunks +38 lines, -7 lines 0 comments Download
M cc/scheduler/scheduler_state_machine.h View 1 4 chunks +21 lines, -8 lines 0 comments Download
M cc/scheduler/scheduler_state_machine.cc View 1 2 8 chunks +68 lines, -9 lines 0 comments Download
M cc/scheduler/scheduler_state_machine_unittest.cc View 1 69 chunks +74 lines, -71 lines 0 comments Download
M cc/scheduler/scheduler_unittest.cc View 1 2 4 chunks +9 lines, -5 lines 0 comments Download
M cc/surfaces/BUILD.gn View 1 1 chunk +2 lines, -0 lines 0 comments Download
M cc/surfaces/compositor_frame_sink_support.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M cc/surfaces/compositor_frame_sink_support.cc View 1 2 2 chunks +16 lines, -0 lines 0 comments Download
M cc/surfaces/direct_compositor_frame_sink_unittest.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M cc/surfaces/display.h View 4 chunks +9 lines, -2 lines 0 comments Download
M cc/surfaces/display.cc View 1 2 3 6 chunks +24 lines, -10 lines 0 comments Download
A cc/surfaces/display_begin_frame_source.h View 1 2 3 1 chunk +100 lines, -0 lines 0 comments Download
A cc/surfaces/display_begin_frame_source.cc View 1 2 3 4 1 chunk +210 lines, -0 lines 0 comments Download
M cc/surfaces/display_scheduler.h View 1 2 4 chunks +17 lines, -20 lines 0 comments Download
M cc/surfaces/display_scheduler.cc View 1 2 13 chunks +55 lines, -84 lines 0 comments Download
M cc/surfaces/display_scheduler_unittest.cc View 1 2 3 4 9 chunks +39 lines, -20 lines 0 comments Download
M cc/surfaces/display_unittest.cc View 1 2 chunks +3 lines, -4 lines 0 comments Download
M cc/test/begin_frame_args_test.h View 2 chunks +11 lines, -1 line 0 comments Download
M cc/test/begin_frame_args_test.cc View 3 chunks +32 lines, -15 lines 0 comments Download
M cc/test/begin_frame_source_test.h View 2 chunks +36 lines, -27 lines 0 comments Download
M cc/test/begin_frame_source_test.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M cc/test/begin_frame_source_test_unittest.cc View 1 1 chunk +58 lines, -58 lines 0 comments Download
M cc/test/fake_external_begin_frame_source.h View 1 2 3 chunks +3 lines, -1 line 0 comments Download
M cc/test/fake_external_begin_frame_source.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M cc/test/fake_layer_tree_host_impl.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/test/test_compositor_frame_sink.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/layer_tree_host.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.h View 1 2 2 chunks +3 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 3 chunks +9 lines, -1 line 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 72 chunks +79 lines, -33 lines 0 comments Download
M cc/trees/proxy_impl.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M cc/trees/single_thread_proxy.cc View 1 2 3 4 3 chunks +10 lines, -1 line 0 comments Download
M components/exo/surface.cc View 1 2 chunks +7 lines, -1 line 0 comments Download
M content/browser/android/synchronous_compositor_browser_filter.h View 2 chunks +7 lines, -10 lines 0 comments Download
M content/browser/android/synchronous_compositor_browser_filter.cc View 3 chunks +16 lines, -25 lines 0 comments Download
M content/browser/compositor/gpu_process_transport_factory.cc View 1 2 3 5 chunks +19 lines, -9 lines 0 comments Download
M content/browser/compositor/mus_browser_compositor_output_surface.h View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/compositor/mus_browser_compositor_output_surface.cc View 1 2 3 2 chunks +10 lines, -1 line 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.h View 1 2 3 chunks +5 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_child_frame.cc View 1 2 3 chunks +22 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/frame_host/render_widget_host_view_guest.cc View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M content/browser/renderer_host/browser_compositor_view_mac.h View 1 2 3 chunks +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/browser_compositor_view_mac.mm View 1 2 3 4 2 chunks +31 lines, -0 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.h View 4 chunks +0 lines, -14 lines 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 5 chunks +3 lines, -102 lines 0 comments Download
M content/browser/renderer_host/delegated_frame_host.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 3 chunks +9 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 2 3 4 9 chunks +26 lines, -14 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 14 chunks +114 lines, -63 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.h View 1 2 3 4 3 chunks +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 3 chunks +33 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_base.h View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M content/common/view_messages.h View 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/android/synchronous_compositor_frame_sink.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M content/renderer/gpu/compositor_external_begin_frame_source.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/gpu/compositor_external_begin_frame_source.cc View 1 2 3 4 2 chunks +13 lines, -0 lines 0 comments Download
M content/renderer/gpu/compositor_forwarding_message_filter_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M services/ui/public/cpp/window_compositor_frame_sink.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M services/ui/public/cpp/window_compositor_frame_sink.cc View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
M services/ui/surfaces/display_compositor.cc View 1 1 chunk +1 line, -2 lines 0 comments Download
M services/ui/surfaces/gpu_compositor_frame_sink.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M services/ui/surfaces/gpu_compositor_frame_sink.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M services/ui/ws/frame_generator.cc View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scheduler/renderer/renderer_scheduler_impl_unittest.cc View 1 2 3 4 25 chunks +77 lines, -50 lines 0 comments Download
M ui/android/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M ui/android/delegated_frame_host_android.h View 2 chunks +8 lines, -4 lines 0 comments Download
M ui/android/delegated_frame_host_android.cc View 2 chunks +7 lines, -9 lines 0 comments Download
M ui/android/window_android.h View 6 chunks +14 lines, -1 line 0 comments Download
M ui/android/window_android.cc View 1 2 5 chunks +122 lines, -5 lines 0 comments Download
M ui/android/window_android_compositor.h View 1 chunk +0 lines, -2 lines 0 comments Download
M ui/android/window_android_observer.h View 1 chunk +0 lines, -2 lines 0 comments Download
M ui/aura/mus/DEPS View 1 chunk +1 line, -0 lines 0 comments Download
M ui/aura/mus/window_compositor_frame_sink.h View 1 chunk +1 line, -0 lines 0 comments Download
M ui/aura/mus/window_compositor_frame_sink.cc View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
M ui/compositor/test/in_process_context_factory.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 149 (140 generated)
Eric Seckler
Hi Brian, This is still missing some polish and tests (and I'm hunting some Android-specific ...
4 years ago (2016-12-05 16:59:46 UTC) #85
Sami
This looks excellent! Thanks for doing the hard work of untangling everything here! For everyone's ...
4 years ago (2016-12-06 12:41:07 UTC) #93
Eric Seckler
On 2016/12/06 12:41:07, Sami wrote: > This looks excellent! Thanks for doing the hard work ...
4 years ago (2016-12-06 17:34:01 UTC) #102
Sami
Thanks for the improvements! Brian, could you have a look too please? https://codereview.chromium.org/2527283003/diff/380001/cc/blimp/layer_tree_host_remote.h File cc/blimp/layer_tree_host_remote.h ...
4 years ago (2016-12-07 16:59:40 UTC) #126
Eric Seckler
The new DCHECKs still fail some additional tests - I think primarily b/c some of ...
4 years ago (2016-12-08 17:54:29 UTC) #140
brianderson
A large patch, so I only looked at the header files I'm most familiar with ...
4 years ago (2016-12-09 01:08:11 UTC) #145
Eric Seckler
Thanks, Brian! :) If you don't have any high-level objections, I'm going to split this ...
4 years ago (2016-12-09 16:47:17 UTC) #147
Sami
+1 to the idea of adjusting the ownership so delegation isn't needed. https://codereview.chromium.org/2527283003/diff/600001/cc/scheduler/begin_frame_source.h File cc/scheduler/begin_frame_source.h ...
4 years ago (2016-12-09 18:36:37 UTC) #148
Eric Seckler
4 years ago (2016-12-12 10:05:27 UTC) #149
On 2016/12/09 18:36:37, Sami wrote:
> Should we do a s/damages/damage/g overall?

Done.

Powered by Google App Engine
This is Rietveld 408576698