OLD | NEW |
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 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 layer_tree_host_->GetLayerTree()->set_has_transparent_background(transparent); | 720 layer_tree_host_->GetLayerTree()->set_has_transparent_background(transparent); |
721 } | 721 } |
722 | 722 |
723 void RenderWidgetCompositor::setVisible(bool visible) { | 723 void RenderWidgetCompositor::setVisible(bool visible) { |
724 if (never_visible_) | 724 if (never_visible_) |
725 return; | 725 return; |
726 | 726 |
727 layer_tree_host_->SetVisible(visible); | 727 layer_tree_host_->SetVisible(visible); |
728 } | 728 } |
729 | 729 |
| 730 float RenderWidgetCompositor::pageScaleFactor() { |
| 731 return layer_tree_host()->GetLayerTree()->page_scale_factor(); |
| 732 } |
| 733 |
| 734 void RenderWidgetCompositor::SetPageScaleFactorForSubframe(float scale) { |
| 735 layer_tree_host()->GetLayerTree()->SetSubframePageScaleFactor(scale); |
| 736 } |
| 737 |
730 void RenderWidgetCompositor::setPageScaleFactorAndLimits( | 738 void RenderWidgetCompositor::setPageScaleFactorAndLimits( |
731 float page_scale_factor, float minimum, float maximum) { | 739 float page_scale_factor, float minimum, float maximum) { |
732 layer_tree_host_->GetLayerTree()->SetPageScaleFactorAndLimits( | 740 layer_tree_host_->GetLayerTree()->SetPageScaleFactorAndLimits( |
733 page_scale_factor, minimum, maximum); | 741 page_scale_factor, minimum, maximum); |
734 } | 742 } |
735 | 743 |
736 void RenderWidgetCompositor::startPageScaleAnimation( | 744 void RenderWidgetCompositor::startPageScaleAnimation( |
737 const blink::WebPoint& destination, | 745 const blink::WebPoint& destination, |
738 bool use_anchor, | 746 bool use_anchor, |
739 float new_page_scale, | 747 float new_page_scale, |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1149 float device_scale) { | 1157 float device_scale) { |
1150 layer_tree_host_->GetLayerTree()->SetPaintedDeviceScaleFactor(device_scale); | 1158 layer_tree_host_->GetLayerTree()->SetPaintedDeviceScaleFactor(device_scale); |
1151 } | 1159 } |
1152 | 1160 |
1153 void RenderWidgetCompositor::SetDeviceColorSpace( | 1161 void RenderWidgetCompositor::SetDeviceColorSpace( |
1154 const gfx::ColorSpace& color_space) { | 1162 const gfx::ColorSpace& color_space) { |
1155 layer_tree_host_->GetLayerTree()->SetDeviceColorSpace(color_space); | 1163 layer_tree_host_->GetLayerTree()->SetDeviceColorSpace(color_space); |
1156 } | 1164 } |
1157 | 1165 |
1158 } // namespace content | 1166 } // namespace content |
OLD | NEW |