Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: content/browser/gpu/gpu_process_host_ui_shim.cc

Issue 12614013: Plumb cc::LatencyInfo through command buffer and output surface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceSuspend, 202 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceSuspend,
203 OnAcceleratedSurfaceSuspend) 203 OnAcceleratedSurfaceSuspend)
204 IPC_MESSAGE_HANDLER(GpuHostMsg_GraphicsInfoCollected, 204 IPC_MESSAGE_HANDLER(GpuHostMsg_GraphicsInfoCollected,
205 OnGraphicsInfoCollected) 205 OnGraphicsInfoCollected)
206 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceRelease, 206 IPC_MESSAGE_HANDLER(GpuHostMsg_AcceleratedSurfaceRelease,
207 OnAcceleratedSurfaceRelease) 207 OnAcceleratedSurfaceRelease)
208 IPC_MESSAGE_HANDLER(GpuHostMsg_VideoMemoryUsageStats, 208 IPC_MESSAGE_HANDLER(GpuHostMsg_VideoMemoryUsageStats,
209 OnVideoMemoryUsageStatsReceived); 209 OnVideoMemoryUsageStatsReceived);
210 IPC_MESSAGE_HANDLER(GpuHostMsg_UpdateVSyncParameters, 210 IPC_MESSAGE_HANDLER(GpuHostMsg_UpdateVSyncParameters,
211 OnUpdateVSyncParameters) 211 OnUpdateVSyncParameters)
212 IPC_MESSAGE_HANDLER(GpuHostMsg_FrameDrawn, OnFrameDrawn)
212 213
213 #if defined(TOOLKIT_GTK) || defined(OS_WIN) 214 #if defined(TOOLKIT_GTK) || defined(OS_WIN)
214 IPC_MESSAGE_HANDLER(GpuHostMsg_ResizeView, OnResizeView) 215 IPC_MESSAGE_HANDLER(GpuHostMsg_ResizeView, OnResizeView)
215 #endif 216 #endif
216 217
217 IPC_MESSAGE_UNHANDLED_ERROR() 218 IPC_MESSAGE_UNHANDLED_ERROR()
218 IPC_END_MESSAGE_MAP() 219 IPC_END_MESSAGE_MAP()
219 220
220 return true; 221 return true;
221 } 222 }
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 delayed_send.Cancel(); 335 delayed_send.Cancel();
335 336
336 static const base::TimeDelta swap_delay = GetSwapDelay(); 337 static const base::TimeDelta swap_delay = GetSwapDelay();
337 if (swap_delay.ToInternalValue()) 338 if (swap_delay.ToInternalValue())
338 base::PlatformThread::Sleep(swap_delay); 339 base::PlatformThread::Sleep(swap_delay);
339 340
340 // View must send ACK message after next composite. 341 // View must send ACK message after next composite.
341 view->AcceleratedSurfaceBuffersSwapped(params, host_id_); 342 view->AcceleratedSurfaceBuffersSwapped(params, host_id_);
342 } 343 }
343 344
345 void GpuProcessHostUIShim::OnFrameDrawn(const cc::LatencyInfo& latency_info) {
346 }
347
344 void GpuProcessHostUIShim::OnAcceleratedSurfacePostSubBuffer( 348 void GpuProcessHostUIShim::OnAcceleratedSurfacePostSubBuffer(
345 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params) { 349 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params) {
346 TRACE_EVENT0("renderer", 350 TRACE_EVENT0("renderer",
347 "GpuProcessHostUIShim::OnAcceleratedSurfacePostSubBuffer"); 351 "GpuProcessHostUIShim::OnAcceleratedSurfacePostSubBuffer");
348 352
349 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; 353 AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
350 ack_params.mailbox_name = params.mailbox_name; 354 ack_params.mailbox_name = params.mailbox_name;
351 ack_params.sync_point = 0; 355 ack_params.sync_point = 0;
352 ScopedSendOnIOThread delayed_send( 356 ScopedSendOnIOThread delayed_send(
353 host_id_, 357 host_id_,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 view->AcceleratedSurfaceRelease(); 394 view->AcceleratedSurfaceRelease();
391 } 395 }
392 396
393 void GpuProcessHostUIShim::OnVideoMemoryUsageStatsReceived( 397 void GpuProcessHostUIShim::OnVideoMemoryUsageStatsReceived(
394 const GPUVideoMemoryUsageStats& video_memory_usage_stats) { 398 const GPUVideoMemoryUsageStats& video_memory_usage_stats) {
395 GpuDataManagerImpl::GetInstance()->UpdateVideoMemoryUsageStats( 399 GpuDataManagerImpl::GetInstance()->UpdateVideoMemoryUsageStats(
396 video_memory_usage_stats); 400 video_memory_usage_stats);
397 } 401 }
398 402
399 } // namespace content 403 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_process_host_ui_shim.h ('k') | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698