| 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 1464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1475 | 1475 |
| 1476 if (view_) { | 1476 if (view_) { |
| 1477 view_->OnSwapCompositorFrame(output_surface_id, frame.Pass()); | 1477 view_->OnSwapCompositorFrame(output_surface_id, frame.Pass()); |
| 1478 view_->DidReceiveRendererFrame(); | 1478 view_->DidReceiveRendererFrame(); |
| 1479 } else { | 1479 } else { |
| 1480 cc::CompositorFrameAck ack; | 1480 cc::CompositorFrameAck ack; |
| 1481 if (frame->gl_frame_data) { | 1481 if (frame->gl_frame_data) { |
| 1482 ack.gl_frame_data = frame->gl_frame_data.Pass(); | 1482 ack.gl_frame_data = frame->gl_frame_data.Pass(); |
| 1483 ack.gl_frame_data->sync_point = 0; | 1483 ack.gl_frame_data->sync_point = 0; |
| 1484 } else if (frame->delegated_frame_data) { | 1484 } else if (frame->delegated_frame_data) { |
| 1485 ack.resources.swap(frame->delegated_frame_data->resource_list); | 1485 cc::ReturnResources(frame->delegated_frame_data->resource_list, |
| 1486 &ack.resources); |
| 1486 } else if (frame->software_frame_data) { | 1487 } else if (frame->software_frame_data) { |
| 1487 ack.last_software_frame_id = frame->software_frame_data->id; | 1488 ack.last_software_frame_id = frame->software_frame_data->id; |
| 1488 } | 1489 } |
| 1489 SendSwapCompositorFrameAck(routing_id_, process_->GetID(), | 1490 SendSwapCompositorFrameAck(routing_id_, process_->GetID(), |
| 1490 output_surface_id, ack); | 1491 output_surface_id, ack); |
| 1491 } | 1492 } |
| 1492 return true; | 1493 return true; |
| 1493 } | 1494 } |
| 1494 | 1495 |
| 1495 void RenderWidgetHostImpl::OnOverscrolled( | 1496 void RenderWidgetHostImpl::OnOverscrolled( |
| (...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2476 int process_id = (b->first.second >> 32) & 0xffffffff; | 2477 int process_id = (b->first.second >> 32) & 0xffffffff; |
| 2477 RenderWidgetHost* rwh = | 2478 RenderWidgetHost* rwh = |
| 2478 RenderWidgetHost::FromID(process_id, routing_id); | 2479 RenderWidgetHost::FromID(process_id, routing_id); |
| 2479 if (!rwh) | 2480 if (!rwh) |
| 2480 continue; | 2481 continue; |
| 2481 RenderWidgetHostImpl::From(rwh)->FrameSwapped(latency_info); | 2482 RenderWidgetHostImpl::From(rwh)->FrameSwapped(latency_info); |
| 2482 } | 2483 } |
| 2483 } | 2484 } |
| 2484 | 2485 |
| 2485 } // namespace content | 2486 } // namespace content |
| OLD | NEW |