Mac Overlays: Send vsync parameters directly
commitbcf5756bd8100a08406faa30b837cc803cd26ca2
authorccameron <ccameron@chromium.org>
Sat, 15 Aug 2015 03:57:36 +0000 (14 20:57 -0700)
committerCommit bot <commit-bot@chromium.org>
Sat, 15 Aug 2015 03:58:12 +0000 (15 03:58 +0000)
tree3ce1926c713e018dccd2abc6f1395cc912d8e573
parent5ac9edba0c0d7099566e4e3e2068a9cb79372804
Mac Overlays: Send vsync parameters directly

The previous attempt was to send the display ID, but, there are two
things to contend with.

1. VSync parameters change wildly -- sometimes a half-interval just
   disappears ... so you need to update your VSync parameters often, or
   they'll be wrong.

2. Computing the VSync parameters is expensive because it creates a
   display link thread, and so on.

This idea of creating a display link for the browser and the gpu,
and hoping that they'd stay in sync, wasn't a good idea. Just send the
parameters directly. We'll need to add some smarts to DisplayLinkMac to
ensure that they're updated frequently.

BUG=515696

Review URL: https://codereview.chromium.org/1297473003

Cr-Commit-Position: refs/heads/master@{#343567}
12 files changed:
content/browser/gpu/gpu_process_host_ui_shim.cc
content/browser/renderer_host/render_widget_host_view_mac.h
content/browser/renderer_host/render_widget_host_view_mac.mm
content/common/gpu/gpu_messages.h
content/common/gpu/image_transport_surface_overlay_mac.h
content/common/gpu/image_transport_surface_overlay_mac.mm
ui/accelerated_widget_mac/accelerated_widget_mac.h
ui/accelerated_widget_mac/accelerated_widget_mac.mm
ui/accelerated_widget_mac/display_link_mac.cc
ui/accelerated_widget_mac/display_link_mac.h
ui/views/cocoa/bridged_native_widget.h
ui/views/cocoa/bridged_native_widget.mm