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

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 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after
1600 1600
1601 bool RenderWidgetHostImpl::OnSwapCompositorFrame( 1601 bool RenderWidgetHostImpl::OnSwapCompositorFrame(
1602 const IPC::Message& message) { 1602 const IPC::Message& message) {
1603 ViewHostMsg_SwapCompositorFrame::Param param; 1603 ViewHostMsg_SwapCompositorFrame::Param param;
1604 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, &param)) 1604 if (!ViewHostMsg_SwapCompositorFrame::Read(&message, &param))
1605 return false; 1605 return false;
1606 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame); 1606 scoped_ptr<cc::CompositorFrame> frame(new cc::CompositorFrame);
1607 param.a.AssignTo(frame.get()); 1607 param.a.AssignTo(frame.get());
1608 1608
1609 if (view_) { 1609 if (view_) {
1610 #if defined(OS_ANDROID)
1611 view_->UpdateFrameInfo(
1612 frame->metadata.root_scroll_offset,
1613 frame->metadata.page_scale_factor,
1614 gfx::Vector2dF(
1615 frame->metadata.min_page_scale_factor,
1616 frame->metadata.max_page_scale_factor),
1617 frame->metadata.root_layer_size,
1618 frame->metadata.viewport_size,
1619 frame->metadata.location_bar_offset,
1620 frame->metadata.location_bar_content_translation,
1621 frame->metadata.overdraw_bottom_height);
1622 #endif
1623 view_->OnSwapCompositorFrame(frame.Pass()); 1610 view_->OnSwapCompositorFrame(frame.Pass());
1624 } else { 1611 } else {
1625 cc::CompositorFrameAck ack; 1612 cc::CompositorFrameAck ack;
1626 if (frame->gl_frame_data) { 1613 if (frame->gl_frame_data) {
1627 ack.gl_frame_data = frame->gl_frame_data.Pass(); 1614 ack.gl_frame_data = frame->gl_frame_data.Pass();
1628 ack.gl_frame_data->sync_point = 0; 1615 ack.gl_frame_data->sync_point = 0;
1629 } else if (frame->delegated_frame_data) { 1616 } else if (frame->delegated_frame_data) {
1630 ack.resources.swap(frame->delegated_frame_data->resource_list); 1617 ack.resources.swap(frame->delegated_frame_data->resource_list);
1631 } else if (frame->software_frame_data) { 1618 } else if (frame->software_frame_data) {
1632 ack.last_dib_id = frame->software_frame_data->dib_id; 1619 ack.last_dib_id = frame->software_frame_data->dib_id;
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
2480 return; 2467 return;
2481 2468
2482 OnRenderAutoResized(new_size); 2469 OnRenderAutoResized(new_size);
2483 } 2470 }
2484 2471
2485 void RenderWidgetHostImpl::DetachDelegate() { 2472 void RenderWidgetHostImpl::DetachDelegate() {
2486 delegate_ = NULL; 2473 delegate_ = NULL;
2487 } 2474 }
2488 2475
2489 } // namespace content 2476 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | content/browser/renderer_host/render_widget_host_view_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698