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

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

Issue 1412663005: Introduce painted-device-scale-factor and use it when --enable-use-zoom-for-dsf is specified. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 const WebSize& device_viewport_size) { 614 const WebSize& device_viewport_size) {
615 layer_tree_host_->SetViewportSize(device_viewport_size); 615 layer_tree_host_->SetViewportSize(device_viewport_size);
616 } 616 }
617 617
618 WebFloatPoint RenderWidgetCompositor::adjustEventPointForPinchZoom( 618 WebFloatPoint RenderWidgetCompositor::adjustEventPointForPinchZoom(
619 const WebFloatPoint& point) const { 619 const WebFloatPoint& point) const {
620 return point; 620 return point;
621 } 621 }
622 622
623 void RenderWidgetCompositor::setDeviceScaleFactor(float device_scale) { 623 void RenderWidgetCompositor::setDeviceScaleFactor(float device_scale) {
624 layer_tree_host_->SetDeviceScaleFactor(device_scale); 624 if (IsUseZoomForDSFEnabled())
625 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale);
danakj 2015/10/22 23:15:29 I think maybe you want a separate function in RWC
oshima 2015/10/23 18:05:36 This is called from mulitple places, RenderWidge
piman 2015/10/23 19:30:33 I kinda agree with Dana. WebViewImpl (and others)
enne (OOO) 2015/10/23 21:21:25 Agreed here as well.
oshima 2015/10/23 22:05:02 How about letting WebWidgetClient set the device s
oshima 2015/10/30 17:35:38 This change wasn't actually necessary. I changed t
626 else
627 layer_tree_host_->SetDeviceScaleFactor(device_scale);
625 } 628 }
626 629
627 void RenderWidgetCompositor::setBackgroundColor(blink::WebColor color) { 630 void RenderWidgetCompositor::setBackgroundColor(blink::WebColor color) {
628 layer_tree_host_->set_background_color(color); 631 layer_tree_host_->set_background_color(color);
629 } 632 }
630 633
631 void RenderWidgetCompositor::setHasTransparentBackground(bool transparent) { 634 void RenderWidgetCompositor::setHasTransparentBackground(bool transparent) {
632 layer_tree_host_->set_has_transparent_background(transparent); 635 layer_tree_host_->set_has_transparent_background(transparent);
633 } 636 }
634 637
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 // Ignore what the system said and give all clients the same maximum 1083 // Ignore what the system said and give all clients the same maximum
1081 // allocation on desktop platforms. 1084 // allocation on desktop platforms.
1082 actual.bytes_limit_when_visible = 512 * 1024 * 1024; 1085 actual.bytes_limit_when_visible = 512 * 1024 * 1024;
1083 actual.priority_cutoff_when_visible = 1086 actual.priority_cutoff_when_visible =
1084 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE; 1087 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE;
1085 #endif 1088 #endif
1086 return actual; 1089 return actual;
1087 } 1090 }
1088 1091
1089 } // namespace content 1092 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698