| 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 1538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1549 } else if (frame.gl_frame_data) { | 1549 } else if (frame.gl_frame_data) { |
| 1550 cc::CompositorFrameAck ack; | 1550 cc::CompositorFrameAck ack; |
| 1551 ack.gl_frame_data.reset(new cc::GLFrameData()); | 1551 ack.gl_frame_data.reset(new cc::GLFrameData()); |
| 1552 ack.gl_frame_data->mailbox = frame.gl_frame_data->mailbox; | 1552 ack.gl_frame_data->mailbox = frame.gl_frame_data->mailbox; |
| 1553 ack.gl_frame_data->size = frame.gl_frame_data->size; | 1553 ack.gl_frame_data->size = frame.gl_frame_data->size; |
| 1554 ack.gl_frame_data->sync_point = 0; | 1554 ack.gl_frame_data->sync_point = 0; |
| 1555 SendSwapCompositorFrameAck(routing_id_, process_->GetID(), ack); | 1555 SendSwapCompositorFrameAck(routing_id_, process_->GetID(), ack); |
| 1556 } | 1556 } |
| 1557 } | 1557 } |
| 1558 | 1558 |
| 1559 void RenderWidgetHostImpl::SwapCompositorFrameAck( |
| 1560 const cc::CompositorFrameAck& ack) { |
| 1561 Send(new ViewMsg_SwapCompositorFrameAck(routing_id_, ack)); |
| 1562 } |
| 1563 |
| 1559 void RenderWidgetHostImpl::OnUpdateRect( | 1564 void RenderWidgetHostImpl::OnUpdateRect( |
| 1560 const ViewHostMsg_UpdateRect_Params& params) { | 1565 const ViewHostMsg_UpdateRect_Params& params) { |
| 1561 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnUpdateRect"); | 1566 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnUpdateRect"); |
| 1562 TimeTicks paint_start = TimeTicks::Now(); | 1567 TimeTicks paint_start = TimeTicks::Now(); |
| 1563 | 1568 |
| 1564 // Update our knowledge of the RenderWidget's size. | 1569 // Update our knowledge of the RenderWidget's size. |
| 1565 current_size_ = params.view_size; | 1570 current_size_ = params.view_size; |
| 1566 // Update our knowledge of the RenderWidget's scroll offset. | 1571 // Update our knowledge of the RenderWidget's scroll offset. |
| 1567 last_scroll_offset_ = params.scroll_offset; | 1572 last_scroll_offset_ = params.scroll_offset; |
| 1568 | 1573 |
| (...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2392 return; | 2397 return; |
| 2393 | 2398 |
| 2394 OnRenderAutoResized(new_size); | 2399 OnRenderAutoResized(new_size); |
| 2395 } | 2400 } |
| 2396 | 2401 |
| 2397 void RenderWidgetHostImpl::DetachDelegate() { | 2402 void RenderWidgetHostImpl::DetachDelegate() { |
| 2398 delegate_ = NULL; | 2403 delegate_ = NULL; |
| 2399 } | 2404 } |
| 2400 | 2405 |
| 2401 } // namespace content | 2406 } // namespace content |
| OLD | NEW |