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

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: Adress Dmitry's comments + sync. Created 4 years, 3 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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 layer_tree_host_->GetLayerTree()->animation_host(); 669 layer_tree_host_->GetLayerTree()->animation_host();
670 DCHECK(animation_host); 670 DCHECK(animation_host);
671 animation_host->RemoveAnimationTimeline(compositor_timeline); 671 animation_host->RemoveAnimationTimeline(compositor_timeline);
672 } 672 }
673 673
674 void RenderWidgetCompositor::setViewportSize( 674 void RenderWidgetCompositor::setViewportSize(
675 const WebSize& device_viewport_size) { 675 const WebSize& device_viewport_size) {
676 layer_tree_host_->GetLayerTree()->SetViewportSize(device_viewport_size); 676 layer_tree_host_->GetLayerTree()->SetViewportSize(device_viewport_size);
677 } 677 }
678 678
679 WebSize RenderWidgetCompositor::getViewportSize() const {
680 return layer_tree_host_->GetLayerTree()->device_viewport_size();
681 }
682
679 WebFloatPoint RenderWidgetCompositor::adjustEventPointForPinchZoom( 683 WebFloatPoint RenderWidgetCompositor::adjustEventPointForPinchZoom(
680 const WebFloatPoint& point) const { 684 const WebFloatPoint& point) const {
681 return point; 685 return point;
682 } 686 }
683 687
684 void RenderWidgetCompositor::setDeviceScaleFactor(float device_scale) { 688 void RenderWidgetCompositor::setDeviceScaleFactor(float device_scale) {
685 layer_tree_host_->GetLayerTree()->SetDeviceScaleFactor(device_scale); 689 layer_tree_host_->GetLayerTree()->SetDeviceScaleFactor(device_scale);
686 } 690 }
687 691
688 void RenderWidgetCompositor::setBackgroundColor(blink::WebColor color) { 692 void RenderWidgetCompositor::setBackgroundColor(blink::WebColor color) {
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 float device_scale) { 1128 float device_scale) {
1125 layer_tree_host_->GetLayerTree()->SetPaintedDeviceScaleFactor(device_scale); 1129 layer_tree_host_->GetLayerTree()->SetPaintedDeviceScaleFactor(device_scale);
1126 } 1130 }
1127 1131
1128 void RenderWidgetCompositor::SetDeviceColorSpace( 1132 void RenderWidgetCompositor::SetDeviceColorSpace(
1129 const gfx::ColorSpace& color_space) { 1133 const gfx::ColorSpace& color_space) {
1130 layer_tree_host_->GetLayerTree()->SetDeviceColorSpace(color_space); 1134 layer_tree_host_->GetLayerTree()->SetDeviceColorSpace(color_space);
1131 } 1135 }
1132 1136
1133 } // namespace content 1137 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698