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 <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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 double duration_sec) { | 650 double duration_sec) { |
651 base::TimeDelta duration = base::TimeDelta::FromMicroseconds( | 651 base::TimeDelta duration = base::TimeDelta::FromMicroseconds( |
652 duration_sec * base::Time::kMicrosecondsPerSecond); | 652 duration_sec * base::Time::kMicrosecondsPerSecond); |
653 layer_tree_host_->StartPageScaleAnimation( | 653 layer_tree_host_->StartPageScaleAnimation( |
654 gfx::Vector2d(destination.x, destination.y), | 654 gfx::Vector2d(destination.x, destination.y), |
655 use_anchor, | 655 use_anchor, |
656 new_page_scale, | 656 new_page_scale, |
657 duration); | 657 duration); |
658 } | 658 } |
659 | 659 |
| 660 bool RenderWidgetCompositor::hasPendingPageScaleAnimation() const { |
| 661 return layer_tree_host_->HasPendingPageScaleAnimation(); |
| 662 } |
| 663 |
660 void RenderWidgetCompositor::heuristicsForGpuRasterizationUpdated( | 664 void RenderWidgetCompositor::heuristicsForGpuRasterizationUpdated( |
661 bool matches_heuristics) { | 665 bool matches_heuristics) { |
662 layer_tree_host_->SetHasGpuRasterizationTrigger(matches_heuristics); | 666 layer_tree_host_->SetHasGpuRasterizationTrigger(matches_heuristics); |
663 } | 667 } |
664 | 668 |
665 void RenderWidgetCompositor::setNeedsAnimate() { | 669 void RenderWidgetCompositor::setNeedsAnimate() { |
666 layer_tree_host_->SetNeedsAnimate(); | 670 layer_tree_host_->SetNeedsAnimate(); |
667 layer_tree_host_->SetNeedsUpdateLayers(); | 671 layer_tree_host_->SetNeedsUpdateLayers(); |
668 } | 672 } |
669 | 673 |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1129 #endif | 1133 #endif |
1130 return actual; | 1134 return actual; |
1131 } | 1135 } |
1132 | 1136 |
1133 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( | 1137 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( |
1134 float device_scale) { | 1138 float device_scale) { |
1135 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); | 1139 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); |
1136 } | 1140 } |
1137 | 1141 |
1138 } // namespace content | 1142 } // namespace content |
OLD | NEW |