| 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/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1700 if (view_) { | 1700 if (view_) { |
| 1701 view_->OnSwapCompositorFrame(frame.Pass()); | 1701 view_->OnSwapCompositorFrame(frame.Pass()); |
| 1702 } else { | 1702 } else { |
| 1703 cc::CompositorFrameAck ack; | 1703 cc::CompositorFrameAck ack; |
| 1704 if (frame->gl_frame_data) { | 1704 if (frame->gl_frame_data) { |
| 1705 ack.gl_frame_data = frame->gl_frame_data.Pass(); | 1705 ack.gl_frame_data = frame->gl_frame_data.Pass(); |
| 1706 ack.gl_frame_data->sync_point = 0; | 1706 ack.gl_frame_data->sync_point = 0; |
| 1707 } else if (frame->delegated_frame_data) { | 1707 } else if (frame->delegated_frame_data) { |
| 1708 ack.resources.swap(frame->delegated_frame_data->resource_list); | 1708 ack.resources.swap(frame->delegated_frame_data->resource_list); |
| 1709 } else if (frame->software_frame_data) { | 1709 } else if (frame->software_frame_data) { |
| 1710 ack.last_dib_id = frame->software_frame_data->dib_id; | 1710 ack.last_software_frame_id = frame->software_frame_data->id; |
| 1711 } | 1711 } |
| 1712 SendSwapCompositorFrameAck(routing_id_, process_->GetID(), ack); | 1712 SendSwapCompositorFrameAck(routing_id_, process_->GetID(), ack); |
| 1713 } | 1713 } |
| 1714 return true; | 1714 return true; |
| 1715 } | 1715 } |
| 1716 | 1716 |
| 1717 void RenderWidgetHostImpl::OnOverscrolled( | 1717 void RenderWidgetHostImpl::OnOverscrolled( |
| 1718 gfx::Vector2dF accumulated_overscroll, | 1718 gfx::Vector2dF accumulated_overscroll, |
| 1719 gfx::Vector2dF current_fling_velocity) { | 1719 gfx::Vector2dF current_fling_velocity) { |
| 1720 if (view_) | 1720 if (view_) |
| (...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2517 rendering_stats_.total_input_latency += | 2517 rendering_stats_.total_input_latency += |
| 2518 l->second.event_count * | 2518 l->second.event_count * |
| 2519 (latency_info.swap_timestamp - l->second.event_time); | 2519 (latency_info.swap_timestamp - l->second.event_time); |
| 2520 | 2520 |
| 2521 if (CommandLine::ForCurrentProcess()->HasSwitch( | 2521 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 2522 switches::kEnableGpuBenchmarking)) | 2522 switches::kEnableGpuBenchmarking)) |
| 2523 Send(new ViewMsg_SetBrowserRenderingStats(routing_id_, rendering_stats_)); | 2523 Send(new ViewMsg_SetBrowserRenderingStats(routing_id_, rendering_stats_)); |
| 2524 } | 2524 } |
| 2525 | 2525 |
| 2526 } // namespace content | 2526 } // namespace content |
| OLD | NEW |