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