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

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

Issue 2237433004: Adds DevTools commands for forced viewport override. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove offset/scale params, rename commands, clip by backing size. Created 4 years, 4 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
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 #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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698