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 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1708 if (view_) { | 1708 if (view_) { |
1709 view_->OnSwapCompositorFrame(frame.Pass()); | 1709 view_->OnSwapCompositorFrame(frame.Pass()); |
1710 } else { | 1710 } else { |
1711 cc::CompositorFrameAck ack; | 1711 cc::CompositorFrameAck ack; |
1712 if (frame->gl_frame_data) { | 1712 if (frame->gl_frame_data) { |
1713 ack.gl_frame_data = frame->gl_frame_data.Pass(); | 1713 ack.gl_frame_data = frame->gl_frame_data.Pass(); |
1714 ack.gl_frame_data->sync_point = 0; | 1714 ack.gl_frame_data->sync_point = 0; |
1715 } else if (frame->delegated_frame_data) { | 1715 } else if (frame->delegated_frame_data) { |
1716 ack.resources.swap(frame->delegated_frame_data->resource_list); | 1716 ack.resources.swap(frame->delegated_frame_data->resource_list); |
1717 } else if (frame->software_frame_data) { | 1717 } else if (frame->software_frame_data) { |
1718 ack.last_dib_id = frame->software_frame_data->dib_id; | 1718 ack.last_software_frame_id = frame->software_frame_data->id; |
1719 } | 1719 } |
1720 SendSwapCompositorFrameAck(routing_id_, process_->GetID(), ack); | 1720 SendSwapCompositorFrameAck(routing_id_, process_->GetID(), ack); |
1721 } | 1721 } |
1722 return true; | 1722 return true; |
1723 } | 1723 } |
1724 | 1724 |
1725 void RenderWidgetHostImpl::OnOverscrolled( | 1725 void RenderWidgetHostImpl::OnOverscrolled( |
1726 gfx::Vector2dF accumulated_overscroll, | 1726 gfx::Vector2dF accumulated_overscroll, |
1727 gfx::Vector2dF current_fling_velocity) { | 1727 gfx::Vector2dF current_fling_velocity) { |
1728 if (view_) | 1728 if (view_) |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2547 if (!host) | 2547 if (!host) |
2548 continue; | 2548 continue; |
2549 RenderWidgetHost* rwh = host->GetRenderWidgetHostByID(routing_id); | 2549 RenderWidgetHost* rwh = host->GetRenderWidgetHostByID(routing_id); |
2550 if (!rwh) | 2550 if (!rwh) |
2551 continue; | 2551 continue; |
2552 RenderWidgetHostImpl::From(rwh)->FrameSwapped(latency_info); | 2552 RenderWidgetHostImpl::From(rwh)->FrameSwapped(latency_info); |
2553 } | 2553 } |
2554 } | 2554 } |
2555 | 2555 |
2556 } // namespace content | 2556 } // namespace content |
OLD | NEW |