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

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
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 void RenderWidgetCompositor::detachCompositorAnimationTimeline( 598 void RenderWidgetCompositor::detachCompositorAnimationTimeline(
599 blink::WebCompositorAnimationTimeline* compositor_timeline) { 599 blink::WebCompositorAnimationTimeline* compositor_timeline) {
600 DCHECK(compositor_timeline); 600 DCHECK(compositor_timeline);
601 DCHECK(layer_tree_host_->animation_host()); 601 DCHECK(layer_tree_host_->animation_host());
602 layer_tree_host_->animation_host()->RemoveAnimationTimeline( 602 layer_tree_host_->animation_host()->RemoveAnimationTimeline(
603 static_cast<const cc_blink::WebCompositorAnimationTimelineImpl*>( 603 static_cast<const cc_blink::WebCompositorAnimationTimelineImpl*>(
604 compositor_timeline)->animation_timeline()); 604 compositor_timeline)->animation_timeline());
605 } 605 }
606 606
607 void RenderWidgetCompositor::setViewportSize( 607 void RenderWidgetCompositor::setViewportSize(
608 const WebSize&,
609 const WebSize& device_viewport_size) {
610 layer_tree_host_->SetViewportSize(device_viewport_size);
611 }
612
613 void RenderWidgetCompositor::setViewportSize(
614 const WebSize& device_viewport_size) { 608 const WebSize& device_viewport_size) {
615 layer_tree_host_->SetViewportSize(device_viewport_size); 609 layer_tree_host_->SetViewportSize(device_viewport_size);
616 } 610 }
617 611
618 WebFloatPoint RenderWidgetCompositor::adjustEventPointForPinchZoom( 612 WebFloatPoint RenderWidgetCompositor::adjustEventPointForPinchZoom(
619 const WebFloatPoint& point) const { 613 const WebFloatPoint& point) const {
620 return point; 614 return point;
621 } 615 }
622 616
623 void RenderWidgetCompositor::setDeviceScaleFactor(float device_scale) { 617 void RenderWidgetCompositor::setDeviceScaleFactor(float device_scale) {
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 #else 1073 #else
1080 // Ignore what the system said and give all clients the same maximum 1074 // Ignore what the system said and give all clients the same maximum
1081 // allocation on desktop platforms. 1075 // allocation on desktop platforms.
1082 actual.bytes_limit_when_visible = 512 * 1024 * 1024; 1076 actual.bytes_limit_when_visible = 512 * 1024 * 1024;
1083 actual.priority_cutoff_when_visible = 1077 actual.priority_cutoff_when_visible =
1084 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE; 1078 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE;
1085 #endif 1079 #endif
1086 return actual; 1080 return actual;
1087 } 1081 }
1088 1082
1083 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor(
1084 float device_scale) {
1085 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale);
1086 }
1087
1089 } // namespace content 1088 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698