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 1601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1612 frame->metadata.overdraw_bottom_height); | 1612 frame->metadata.overdraw_bottom_height); |
1613 #endif | 1613 #endif |
1614 view_->OnSwapCompositorFrame(frame.Pass()); | 1614 view_->OnSwapCompositorFrame(frame.Pass()); |
1615 } else { | 1615 } else { |
1616 cc::CompositorFrameAck ack; | 1616 cc::CompositorFrameAck ack; |
1617 if (frame->gl_frame_data) { | 1617 if (frame->gl_frame_data) { |
1618 ack.gl_frame_data = frame->gl_frame_data.Pass(); | 1618 ack.gl_frame_data = frame->gl_frame_data.Pass(); |
1619 ack.gl_frame_data->sync_point = 0; | 1619 ack.gl_frame_data->sync_point = 0; |
1620 } else if (frame->delegated_frame_data) { | 1620 } else if (frame->delegated_frame_data) { |
1621 ack.resources.swap(frame->delegated_frame_data->resource_list); | 1621 ack.resources.swap(frame->delegated_frame_data->resource_list); |
| 1622 } else if (frame->software_frame_data) { |
| 1623 ack.last_content_dib = frame->software_frame_data->content_dib; |
1622 } | 1624 } |
1623 SendSwapCompositorFrameAck(routing_id_, process_->GetID(), ack); | 1625 SendSwapCompositorFrameAck(routing_id_, process_->GetID(), ack); |
1624 } | 1626 } |
1625 return true; | 1627 return true; |
1626 } | 1628 } |
1627 | 1629 |
1628 void RenderWidgetHostImpl::OnUpdateRect( | 1630 void RenderWidgetHostImpl::OnUpdateRect( |
1629 const ViewHostMsg_UpdateRect_Params& params) { | 1631 const ViewHostMsg_UpdateRect_Params& params) { |
1630 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnUpdateRect"); | 1632 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnUpdateRect"); |
1631 TimeTicks paint_start = TimeTicks::Now(); | 1633 TimeTicks paint_start = TimeTicks::Now(); |
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2469 return; | 2471 return; |
2470 | 2472 |
2471 OnRenderAutoResized(new_size); | 2473 OnRenderAutoResized(new_size); |
2472 } | 2474 } |
2473 | 2475 |
2474 void RenderWidgetHostImpl::DetachDelegate() { | 2476 void RenderWidgetHostImpl::DetachDelegate() { |
2475 delegate_ = NULL; | 2477 delegate_ = NULL; |
2476 } | 2478 } |
2477 | 2479 |
2478 } // namespace content | 2480 } // namespace content |
OLD | NEW |