| 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 <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 Loading... |
| 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) { |
| 624 layer_tree_host_->SetDeviceScaleFactor(device_scale); | 618 if (IsUseZoomForDSFEnabled()) |
| 619 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); |
| 620 else |
| 621 layer_tree_host_->SetDeviceScaleFactor(device_scale); |
| 625 } | 622 } |
| 626 | 623 |
| 627 void RenderWidgetCompositor::setBackgroundColor(blink::WebColor color) { | 624 void RenderWidgetCompositor::setBackgroundColor(blink::WebColor color) { |
| 628 layer_tree_host_->set_background_color(color); | 625 layer_tree_host_->set_background_color(color); |
| 629 } | 626 } |
| 630 | 627 |
| 631 void RenderWidgetCompositor::setHasTransparentBackground(bool transparent) { | 628 void RenderWidgetCompositor::setHasTransparentBackground(bool transparent) { |
| 632 layer_tree_host_->set_has_transparent_background(transparent); | 629 layer_tree_host_->set_has_transparent_background(transparent); |
| 633 } | 630 } |
| 634 | 631 |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1080 // Ignore what the system said and give all clients the same maximum | 1077 // Ignore what the system said and give all clients the same maximum |
| 1081 // allocation on desktop platforms. | 1078 // allocation on desktop platforms. |
| 1082 actual.bytes_limit_when_visible = 512 * 1024 * 1024; | 1079 actual.bytes_limit_when_visible = 512 * 1024 * 1024; |
| 1083 actual.priority_cutoff_when_visible = | 1080 actual.priority_cutoff_when_visible = |
| 1084 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE; | 1081 gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE; |
| 1085 #endif | 1082 #endif |
| 1086 return actual; | 1083 return actual; |
| 1087 } | 1084 } |
| 1088 | 1085 |
| 1089 } // namespace content | 1086 } // namespace content |
| OLD | NEW |