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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 delayed_send.Cancel(); | 335 delayed_send.Cancel(); |
336 | 336 |
337 static const base::TimeDelta swap_delay = GetSwapDelay(); | 337 static const base::TimeDelta swap_delay = GetSwapDelay(); |
338 if (swap_delay.ToInternalValue()) | 338 if (swap_delay.ToInternalValue()) |
339 base::PlatformThread::Sleep(swap_delay); | 339 base::PlatformThread::Sleep(swap_delay); |
340 | 340 |
341 // View must send ACK message after next composite. | 341 // View must send ACK message after next composite. |
342 view->AcceleratedSurfaceBuffersSwapped(params, host_id_); | 342 view->AcceleratedSurfaceBuffersSwapped(params, host_id_); |
343 } | 343 } |
344 | 344 |
345 void GpuProcessHostUIShim::OnFrameDrawn(const cc::LatencyInfo& latency_info) { | 345 void GpuProcessHostUIShim::OnFrameDrawn(const ui::LatencyInfo& latency_info) { |
346 } | 346 } |
347 | 347 |
348 void GpuProcessHostUIShim::OnAcceleratedSurfacePostSubBuffer( | 348 void GpuProcessHostUIShim::OnAcceleratedSurfacePostSubBuffer( |
349 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params) { | 349 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params) { |
350 TRACE_EVENT0("renderer", | 350 TRACE_EVENT0("renderer", |
351 "GpuProcessHostUIShim::OnAcceleratedSurfacePostSubBuffer"); | 351 "GpuProcessHostUIShim::OnAcceleratedSurfacePostSubBuffer"); |
352 | 352 |
353 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; | 353 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; |
354 ack_params.mailbox_name = params.mailbox_name; | 354 ack_params.mailbox_name = params.mailbox_name; |
355 ack_params.sync_point = 0; | 355 ack_params.sync_point = 0; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 view->AcceleratedSurfaceRelease(); | 394 view->AcceleratedSurfaceRelease(); |
395 } | 395 } |
396 | 396 |
397 void GpuProcessHostUIShim::OnVideoMemoryUsageStatsReceived( | 397 void GpuProcessHostUIShim::OnVideoMemoryUsageStatsReceived( |
398 const GPUVideoMemoryUsageStats& video_memory_usage_stats) { | 398 const GPUVideoMemoryUsageStats& video_memory_usage_stats) { |
399 GpuDataManagerImpl::GetInstance()->UpdateVideoMemoryUsageStats( | 399 GpuDataManagerImpl::GetInstance()->UpdateVideoMemoryUsageStats( |
400 video_memory_usage_stats); | 400 video_memory_usage_stats); |
401 } | 401 } |
402 | 402 |
403 } // namespace content | 403 } // namespace content |
OLD | NEW |