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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
703 layer_tree_host_->GetLayerTree()->animation_host(); | 703 layer_tree_host_->GetLayerTree()->animation_host(); |
704 DCHECK(animation_host); | 704 DCHECK(animation_host); |
705 animation_host->RemoveAnimationTimeline(compositor_timeline); | 705 animation_host->RemoveAnimationTimeline(compositor_timeline); |
706 } | 706 } |
707 | 707 |
708 void RenderWidgetCompositor::setViewportSize( | 708 void RenderWidgetCompositor::setViewportSize( |
709 const WebSize& device_viewport_size) { | 709 const WebSize& device_viewport_size) { |
710 layer_tree_host_->GetLayerTree()->SetViewportSize(device_viewport_size); | 710 layer_tree_host_->GetLayerTree()->SetViewportSize(device_viewport_size); |
711 } | 711 } |
712 | 712 |
| 713 WebSize RenderWidgetCompositor::getViewportSize() const { |
| 714 return layer_tree_host_->GetLayerTree()->device_viewport_size(); |
| 715 } |
| 716 |
713 WebFloatPoint RenderWidgetCompositor::adjustEventPointForPinchZoom( | 717 WebFloatPoint RenderWidgetCompositor::adjustEventPointForPinchZoom( |
714 const WebFloatPoint& point) const { | 718 const WebFloatPoint& point) const { |
715 return point; | 719 return point; |
716 } | 720 } |
717 | 721 |
718 void RenderWidgetCompositor::setDeviceScaleFactor(float device_scale) { | 722 void RenderWidgetCompositor::setDeviceScaleFactor(float device_scale) { |
719 layer_tree_host_->GetLayerTree()->SetDeviceScaleFactor(device_scale); | 723 layer_tree_host_->GetLayerTree()->SetDeviceScaleFactor(device_scale); |
720 } | 724 } |
721 | 725 |
| 726 float RenderWidgetCompositor::getDeviceScaleFactor() const { |
| 727 return layer_tree_host_->GetLayerTree()->device_scale_factor(); |
| 728 } |
| 729 |
722 void RenderWidgetCompositor::setBackgroundColor(blink::WebColor color) { | 730 void RenderWidgetCompositor::setBackgroundColor(blink::WebColor color) { |
723 layer_tree_host_->GetLayerTree()->set_background_color(color); | 731 layer_tree_host_->GetLayerTree()->set_background_color(color); |
724 } | 732 } |
725 | 733 |
726 void RenderWidgetCompositor::setHasTransparentBackground(bool transparent) { | 734 void RenderWidgetCompositor::setHasTransparentBackground(bool transparent) { |
727 layer_tree_host_->GetLayerTree()->set_has_transparent_background(transparent); | 735 layer_tree_host_->GetLayerTree()->set_has_transparent_background(transparent); |
728 } | 736 } |
729 | 737 |
730 void RenderWidgetCompositor::setVisible(bool visible) { | 738 void RenderWidgetCompositor::setVisible(bool visible) { |
731 if (never_visible_) | 739 if (never_visible_) |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1153 | 1161 |
1154 remote_proto_channel_receiver_->OnProtoReceived(std::move(deserialized)); | 1162 remote_proto_channel_receiver_->OnProtoReceived(std::move(deserialized)); |
1155 } | 1163 } |
1156 | 1164 |
1157 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( | 1165 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( |
1158 float device_scale) { | 1166 float device_scale) { |
1159 layer_tree_host_->GetLayerTree()->SetPaintedDeviceScaleFactor(device_scale); | 1167 layer_tree_host_->GetLayerTree()->SetPaintedDeviceScaleFactor(device_scale); |
1160 } | 1168 } |
1161 | 1169 |
1162 } // namespace content | 1170 } // namespace content |
OLD | NEW |