OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 5 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 IPC_MESSAGE_HANDLER(GpuHostMsg_ResizeView, OnResizeView) | 213 IPC_MESSAGE_HANDLER(GpuHostMsg_ResizeView, OnResizeView) |
214 #endif | 214 #endif |
215 | 215 |
216 IPC_MESSAGE_UNHANDLED_ERROR() | 216 IPC_MESSAGE_UNHANDLED_ERROR() |
217 IPC_END_MESSAGE_MAP() | 217 IPC_END_MESSAGE_MAP() |
218 | 218 |
219 return true; | 219 return true; |
220 } | 220 } |
221 | 221 |
222 void GpuProcessHostUIShim::OnUpdateVSyncParameters(int surface_id, | 222 void GpuProcessHostUIShim::OnUpdateVSyncParameters(int surface_id, |
223 base::TimeTicks timebase, | 223 base::TimeTicks timebase, |
224 base::TimeDelta interval) { | 224 base::TimeDelta interval) { |
225 | 225 |
226 int render_process_id = 0; | 226 int render_process_id = 0; |
227 int render_widget_id = 0; | 227 int render_widget_id = 0; |
228 if (!GpuSurfaceTracker::Get()->GetRenderWidgetIDForSurface( | 228 if (!GpuSurfaceTracker::Get()->GetRenderWidgetIDForSurface( |
229 surface_id, &render_process_id, &render_widget_id)) { | 229 surface_id, &render_process_id, &render_widget_id)) { |
230 return; | 230 return; |
231 } | 231 } |
232 RenderProcessHost* host = RenderProcessHost::FromID(render_process_id); | 232 RenderProcessHost* host = RenderProcessHost::FromID(render_process_id); |
233 if (!host) | 233 if (!host) |
234 return; | 234 return; |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 view->AcceleratedSurfaceRelease(); | 389 view->AcceleratedSurfaceRelease(); |
390 } | 390 } |
391 | 391 |
392 void GpuProcessHostUIShim::OnVideoMemoryUsageStatsReceived( | 392 void GpuProcessHostUIShim::OnVideoMemoryUsageStatsReceived( |
393 const GPUVideoMemoryUsageStats& video_memory_usage_stats) { | 393 const GPUVideoMemoryUsageStats& video_memory_usage_stats) { |
394 GpuDataManagerImpl::GetInstance()->UpdateVideoMemoryUsageStats( | 394 GpuDataManagerImpl::GetInstance()->UpdateVideoMemoryUsageStats( |
395 video_memory_usage_stats); | 395 video_memory_usage_stats); |
396 } | 396 } |
397 | 397 |
398 } // namespace content | 398 } // namespace content |
OLD | NEW |