OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 "cc/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 3093 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3104 | 3104 |
3105 if (animation_registrar_->ActivateAnimations()) | 3105 if (animation_registrar_->ActivateAnimations()) |
3106 SetNeedsAnimate(); | 3106 SetNeedsAnimate(); |
3107 } | 3107 } |
3108 | 3108 |
3109 std::string LayerTreeHostImpl::LayerTreeAsJson() const { | 3109 std::string LayerTreeHostImpl::LayerTreeAsJson() const { |
3110 std::string str; | 3110 std::string str; |
3111 if (active_tree_->root_layer()) { | 3111 if (active_tree_->root_layer()) { |
3112 scoped_ptr<base::Value> json(active_tree_->root_layer()->LayerTreeAsJson()); | 3112 scoped_ptr<base::Value> json(active_tree_->root_layer()->LayerTreeAsJson()); |
3113 base::JSONWriter::WriteWithOptions( | 3113 base::JSONWriter::WriteWithOptions( |
3114 json.get(), base::JSONWriter::OPTIONS_PRETTY_PRINT, &str); | 3114 *json, base::JSONWriter::OPTIONS_PRETTY_PRINT, &str); |
3115 } | 3115 } |
3116 return str; | 3116 return str; |
3117 } | 3117 } |
3118 | 3118 |
3119 int LayerTreeHostImpl::SourceAnimationFrameNumber() const { | 3119 int LayerTreeHostImpl::SourceAnimationFrameNumber() const { |
3120 return fps_counter_->current_frame_number(); | 3120 return fps_counter_->current_frame_number(); |
3121 } | 3121 } |
3122 | 3122 |
3123 void LayerTreeHostImpl::StartAnimatingScrollbarAnimationController( | 3123 void LayerTreeHostImpl::StartAnimatingScrollbarAnimationController( |
3124 ScrollbarAnimationController* controller) { | 3124 ScrollbarAnimationController* controller) { |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3421 new_target.SetToMin(layer_impl->MaxScrollOffset()); | 3421 new_target.SetToMin(layer_impl->MaxScrollOffset()); |
3422 | 3422 |
3423 curve->UpdateTarget( | 3423 curve->UpdateTarget( |
3424 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) | 3424 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) |
3425 .InSecondsF(), | 3425 .InSecondsF(), |
3426 new_target); | 3426 new_target); |
3427 | 3427 |
3428 return true; | 3428 return true; |
3429 } | 3429 } |
3430 } // namespace cc | 3430 } // namespace cc |
OLD | NEW |