Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 14210004: Consolidate UpdateFrameInfo and SwapCompositorFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 1580 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 1591
1592 bool RenderWidgetHostImpl::OnSwapCompositorFrame( 1592 bool RenderWidgetHostImpl::OnSwapCompositorFrame(
1593 const IPC::Message& message) { 1593 const IPC::Message& message) {
1594 ViewHostMsg_SwapCompositorFrame::Param param; 1594 ViewHostMsg_SwapCompositorFrame::Param param;
1595 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, &param)) 1595 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, &param))
1596 return false; 1596 return false;
1597 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); 1597 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame);
1598 param.a.AssignTo(frame.get()); 1598 param.a.AssignTo(frame.get());
1599 1599
1600 if (view_) { 1600 if (view_) {
1601 #if defined(OS_ANDROID)
1602 view_->UpdateFrameInfo(
1603 frame->metadata.root_scroll_offset,
1604 frame->metadata.page_scale_factor,
1605 gfx::Vector2dF(
1606 frame->metadata.min_page_scale_factor,
1607 frame->metadata.max_page_scale_factor),
1608 frame->metadata.root_layer_size,
1609 frame->metadata.viewport_size,
1610 frame->metadata.location_bar_offset,
1611 frame->metadata.location_bar_content_translation,
1612 frame->metadata.overdraw_bottom_height);
1613 #endif
1614 view_->OnSwapCompositorFrame(frame.Pass()); 1601 view_->OnSwapCompositorFrame(frame.Pass());
1615 } else { 1602 } else {
1616 cc::CompositorFrameAck ack; 1603 cc::CompositorFrameAck ack;
1617 if (frame->gl_frame_data) { 1604 if (frame->gl_frame_data) {
1618 ack.gl_frame_data = frame->gl_frame_data.Pass(); 1605 ack.gl_frame_data = frame->gl_frame_data.Pass();
1619 ack.gl_frame_data->sync_point = 0; 1606 ack.gl_frame_data->sync_point = 0;
1620 } else if (frame->delegated_frame_data) { 1607 } else if (frame->delegated_frame_data) {
1621 ack.resources.swap(frame->delegated_frame_data->resource_list); 1608 ack.resources.swap(frame->delegated_frame_data->resource_list);
1622 } else if (frame->software_frame_data) { 1609 } else if (frame->software_frame_data) {
1623 ack.last_dib_id = frame->software_frame_data->dib_id; 1610 ack.last_dib_id = frame->software_frame_data->dib_id;
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
2471 return; 2458 return;
2472 2459
2473 OnRenderAutoResized(new_size); 2460 OnRenderAutoResized(new_size);
2474 } 2461 }
2475 2462
2476 void RenderWidgetHostImpl::DetachDelegate() { 2463 void RenderWidgetHostImpl::DetachDelegate() {
2477 delegate_ = NULL; 2464 delegate_ = NULL;
2478 } 2465 }
2479 2466
2480 } // namespace content 2467 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698