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

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

Issue 123563002: Remove gpu side LatencyInfo merging (Closed) Base URL: http://git.chromium.org/chromium/src.git@gpu-per-event-latency-6-small
Patch Set: ignore ViewHostMsg_CompositorSurfaceBuffersSwapped msg if the latency_info list if too big Created 6 years, 11 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
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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 305
306 static const base::TimeDelta swap_delay = GetSwapDelay(); 306 static const base::TimeDelta swap_delay = GetSwapDelay();
307 if (swap_delay.ToInternalValue()) 307 if (swap_delay.ToInternalValue())
308 base::PlatformThread::Sleep(swap_delay); 308 base::PlatformThread::Sleep(swap_delay);
309 309
310 // View must send ACK message after next composite. 310 // View must send ACK message after next composite.
311 view->AcceleratedSurfaceBuffersSwapped(params, host_id_); 311 view->AcceleratedSurfaceBuffersSwapped(params, host_id_);
312 view->DidReceiveRendererFrame(); 312 view->DidReceiveRendererFrame();
313 } 313 }
314 314
315 void GpuProcessHostUIShim::OnFrameDrawn(const ui::LatencyInfo& latency_info) { 315 void GpuProcessHostUIShim::OnFrameDrawn(
316 const std::vector<ui::LatencyInfo>& latency_info) {
jln (very slow on Chromium) 2014/01/14 01:11:52 check for size() here as well.
Yufeng Shen (Slow to review) 2014/01/14 20:02:42 Done.
316 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); 317 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info);
317 } 318 }
318 319
319 void GpuProcessHostUIShim::OnAcceleratedSurfacePostSubBuffer( 320 void GpuProcessHostUIShim::OnAcceleratedSurfacePostSubBuffer(
320 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params) { 321 const GpuHostMsg_AcceleratedSurfacePostSubBuffer_Params& params) {
321 TRACE_EVENT0("renderer", 322 TRACE_EVENT0("renderer",
jln (very slow on Chromium) 2014/01/14 01:11:52 check for size() here as well.
Yufeng Shen (Slow to review) 2014/01/14 20:02:42 Done.
322 "GpuProcessHostUIShim::OnAcceleratedSurfacePostSubBuffer"); 323 "GpuProcessHostUIShim::OnAcceleratedSurfacePostSubBuffer");
323 324
324 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; 325 AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
325 ack_params.mailbox_name = params.mailbox_name; 326 ack_params.mailbox_name = params.mailbox_name;
326 ack_params.sync_point = 0; 327 ack_params.sync_point = 0;
327 ScopedSendOnIOThread delayed_send( 328 ScopedSendOnIOThread delayed_send(
328 host_id_, 329 host_id_,
329 new AcceleratedSurfaceMsg_BufferPresented(params.route_id, 330 new AcceleratedSurfaceMsg_BufferPresented(params.route_id,
330 ack_params)); 331 ack_params));
331 332
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
366 view->AcceleratedSurfaceRelease(); 367 view->AcceleratedSurfaceRelease();
367 } 368 }
368 369
369 void GpuProcessHostUIShim::OnVideoMemoryUsageStatsReceived( 370 void GpuProcessHostUIShim::OnVideoMemoryUsageStatsReceived(
370 const GPUVideoMemoryUsageStats& video_memory_usage_stats) { 371 const GPUVideoMemoryUsageStats& video_memory_usage_stats) {
371 GpuDataManagerImpl::GetInstance()->UpdateVideoMemoryUsageStats( 372 GpuDataManagerImpl::GetInstance()->UpdateVideoMemoryUsageStats(
372 video_memory_usage_stats); 373 video_memory_usage_stats);
373 } 374 }
374 375
375 } // namespace content 376 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698