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

Side by Side Diff: content/renderer/gpu/render_widget_compositor.cc

Issue 2652643004: Make PageScaleFactor work for oopif subframes.
Patch Set: Put function prototype in correct place. Created 3 years, 10 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
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/renderer/gpu/render_widget_compositor.h" 5 #include "content/renderer/gpu/render_widget_compositor.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cmath> 9 #include <cmath>
10 #include <limits> 10 #include <limits>
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 layer_tree_host_->GetLayerTree()->set_has_transparent_background(transparent); 697 layer_tree_host_->GetLayerTree()->set_has_transparent_background(transparent);
698 } 698 }
699 699
700 void RenderWidgetCompositor::setVisible(bool visible) { 700 void RenderWidgetCompositor::setVisible(bool visible) {
701 if (never_visible_) 701 if (never_visible_)
702 return; 702 return;
703 703
704 layer_tree_host_->SetVisible(visible); 704 layer_tree_host_->SetVisible(visible);
705 } 705 }
706 706
707 float RenderWidgetCompositor::pageScaleFactor() {
708 return layer_tree_host()->GetLayerTree()->page_scale_factor();
709 }
710
711 void RenderWidgetCompositor::SetPageScaleFactorForSubframe(float scale) {
712 layer_tree_host()->GetLayerTree()->SetSubframePageScaleFactor(scale);
713 }
714
707 void RenderWidgetCompositor::setPageScaleFactorAndLimits( 715 void RenderWidgetCompositor::setPageScaleFactorAndLimits(
708 float page_scale_factor, float minimum, float maximum) { 716 float page_scale_factor, float minimum, float maximum) {
709 layer_tree_host_->GetLayerTree()->SetPageScaleFactorAndLimits( 717 layer_tree_host_->GetLayerTree()->SetPageScaleFactorAndLimits(
710 page_scale_factor, minimum, maximum); 718 page_scale_factor, minimum, maximum);
711 } 719 }
712 720
713 void RenderWidgetCompositor::startPageScaleAnimation( 721 void RenderWidgetCompositor::startPageScaleAnimation(
714 const blink::WebPoint& destination, 722 const blink::WebPoint& destination,
715 bool use_anchor, 723 bool use_anchor,
716 float new_page_scale, 724 float new_page_scale,
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
1134 void RenderWidgetCompositor::SetDeviceColorSpace( 1142 void RenderWidgetCompositor::SetDeviceColorSpace(
1135 const gfx::ColorSpace& color_space) { 1143 const gfx::ColorSpace& color_space) {
1136 layer_tree_host_->GetLayerTree()->SetDeviceColorSpace(color_space); 1144 layer_tree_host_->GetLayerTree()->SetDeviceColorSpace(color_space);
1137 } 1145 }
1138 1146
1139 void RenderWidgetCompositor::SetIsForOopif(bool is_for_oopif) { 1147 void RenderWidgetCompositor::SetIsForOopif(bool is_for_oopif) {
1140 is_for_oopif_ = is_for_oopif; 1148 is_for_oopif_ = is_for_oopif;
1141 } 1149 }
1142 1150
1143 } // namespace content 1151 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698