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

Issue 11833009: Provide a vsync notification to the renderer (Closed)

Created:
7 years, 11 months ago by Sami
Modified:
7 years, 6 months ago
Reviewers:
jamesr, brianderson
CC:
chromium-reviews, yusukes+watch_chromium.org, jam, penghuang+watch_chromium.org, apatrick_chromium, joi+watch-content_chromium.org, darin-cc_chromium.org, cc-bugs_chromium.org, James Su
Visibility:
Public.

Description

This patch allows the renderer to subscribe to a vsync notification from the browser. The renderer will use this notification to align its rendering to the start of a display refresh interval to maximize the changes a new frame is ready by the next vsync. Some platforms such as Android also deliver input events immediately before the vsync signal, so rendering as a response to this signal guarantees all input events for the current frame have been received. The notification will be sent for all future vsyncs until it is explicitly disabled. This reduces IPC overhead since the notification only needs to be requested once. In the renderer the vsync notification is delivered as a callback from the compositor output surface directly to the impl thread to avoid unnecessary thread hops. BUG=168459 TEST=LayerTreeHostTestVSyncNotification

Patch Set 1 #

Patch Set 2 : Always name parameters. #

Patch Set 3 : Fix potential NPE in ContentViewCore. #

Patch Set 4 : Build fix for tests. #

Patch Set 5 : Took out browser parts. Added test. #

Patch Set 6 : Rebased. #

Patch Set 7 : Fixed a typo. #

Patch Set 8 : Rebased. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+181 lines, -7 lines) Patch
M cc/layer_tree_host_impl.h View 1 2 3 4 5 6 7 3 chunks +3 lines, -0 lines 0 comments Download
M cc/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 2 chunks +10 lines, -0 lines 0 comments Download
M cc/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M cc/layer_tree_host_unittest.cc View 1 2 3 4 5 6 7 1 chunk +53 lines, -0 lines 0 comments Download
M cc/output_surface.h View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M cc/output_surface_client.h View 1 chunk +1 line, -0 lines 0 comments Download
M cc/single_thread_proxy.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M cc/test/fake_layer_tree_host_impl_client.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M cc/test/fake_output_surface.h View 1 2 3 4 3 chunks +11 lines, -0 lines 0 comments Download
M cc/test/fake_output_surface.cc View 1 2 3 4 2 chunks +12 lines, -1 line 0 comments Download
M cc/thread_proxy.h View 1 2 3 4 5 6 7 5 chunks +8 lines, -1 line 0 comments Download
M cc/thread_proxy.cc View 1 2 3 4 5 6 7 5 chunks +24 lines, -3 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 2 3 4 5 6 7 3 chunks +12 lines, -0 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 7 1 chunk +12 lines, -1 line 0 comments Download
M content/port/browser/render_widget_host_view_port.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M content/renderer/gpu/compositor_output_surface.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M content/renderer/gpu/compositor_output_surface.cc View 1 2 3 4 5 6 7 3 chunks +16 lines, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
Sami
This patch lets renderers register for vsync notification and provides the plumbing to send the ...
7 years, 11 months ago (2013-01-09 20:20:12 UTC) #1
Sami
7 years, 11 months ago (2013-01-17 14:23:30 UTC) #2
Okay, I took the hint and reduced this to just the renderer parts and added a cc
unit test. Looks better, or WDYT?

N.B. still depends on https://codereview.chromium.org/11414308/.

Powered by Google App Engine
This is Rietveld 408576698