| 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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 #endif | 1126 #endif |
| 1123 return actual; | 1127 return actual; |
| 1124 } | 1128 } |
| 1125 | 1129 |
| 1126 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( | 1130 void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( |
| 1127 float device_scale) { | 1131 float device_scale) { |
| 1128 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); | 1132 layer_tree_host_->SetPaintedDeviceScaleFactor(device_scale); |
| 1129 } | 1133 } |
| 1130 | 1134 |
| 1131 } // namespace content | 1135 } // namespace content |
| OLD | NEW |