| Index: content/browser/gpu/gpu_process_host_ui_shim.cc
|
| diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc
|
| index 575f4b516354d5f2b23b233e320e22e90514a102..93aa1e5c96158568b249c44c7ca0f7f74a8bb773 100644
|
| --- a/content/browser/gpu/gpu_process_host_ui_shim.cc
|
| +++ b/content/browser/gpu/gpu_process_host_ui_shim.cc
|
| @@ -203,6 +203,9 @@ bool GpuProcessHostUIShim::OnControlMessageReceived(
|
| OnAcceleratedSurfaceRelease)
|
| IPC_MESSAGE_HANDLER(GpuHostMsg_VideoMemoryUsageStats,
|
| OnVideoMemoryUsageStatsReceived);
|
| + IPC_MESSAGE_HANDLER(GpuHostMsg_UpdateVSyncParameters,
|
| + OnUpdateVSyncParameters)
|
| +
|
| #if defined(TOOLKIT_GTK) || defined(OS_WIN)
|
| IPC_MESSAGE_HANDLER(GpuHostMsg_ResizeView, OnResizeView)
|
| #endif
|
| @@ -213,6 +216,25 @@ bool GpuProcessHostUIShim::OnControlMessageReceived(
|
| return true;
|
| }
|
|
|
| +void GpuProcessHostUIShim::OnUpdateVSyncParameters(int surface_id,
|
| + base::TimeTicks timebase,
|
| + base::TimeDelta interval) {
|
| +
|
| + int render_process_id = 0;
|
| + int render_widget_id = 0;
|
| + if (!GpuSurfaceTracker::Get()->GetRenderWidgetIDForSurface(
|
| + surface_id, &render_process_id, &render_widget_id)) {
|
| + return;
|
| + }
|
| + RenderProcessHost* host = RenderProcessHost::FromID(render_process_id);
|
| + if (!host)
|
| + return;
|
| + RenderWidgetHost* rwh = host->GetRenderWidgetHostByID(render_widget_id);
|
| + if (!rwh)
|
| + return;
|
| + RenderWidgetHostImpl::From(rwh)->UpdateVSyncParameters(timebase, interval);
|
| +}
|
| +
|
| void GpuProcessHostUIShim::OnLogMessage(
|
| int level,
|
| const std::string& header,
|
|
|