| 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 3068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3079 | 3079 |
| 3080 if (animation_registrar_->ActivateAnimations()) | 3080 if (animation_registrar_->ActivateAnimations()) |
| 3081 SetNeedsAnimate(); | 3081 SetNeedsAnimate(); |
| 3082 } | 3082 } |
| 3083 | 3083 |
| 3084 std::string LayerTreeHostImpl::LayerTreeAsJson() const { | 3084 std::string LayerTreeHostImpl::LayerTreeAsJson() const { |
| 3085 std::string str; | 3085 std::string str; |
| 3086 if (active_tree_->root_layer()) { | 3086 if (active_tree_->root_layer()) { |
| 3087 scoped_ptr<base::Value> json(active_tree_->root_layer()->LayerTreeAsJson()); | 3087 scoped_ptr<base::Value> json(active_tree_->root_layer()->LayerTreeAsJson()); |
| 3088 base::JSONWriter::WriteWithOptions( | 3088 base::JSONWriter::WriteWithOptions( |
| 3089 json.get(), base::JSONWriter::OPTIONS_PRETTY_PRINT, &str); | 3089 *json, base::JSONWriter::OPTIONS_PRETTY_PRINT, &str); |
| 3090 } | 3090 } |
| 3091 return str; | 3091 return str; |
| 3092 } | 3092 } |
| 3093 | 3093 |
| 3094 int LayerTreeHostImpl::SourceAnimationFrameNumber() const { | 3094 int LayerTreeHostImpl::SourceAnimationFrameNumber() const { |
| 3095 return fps_counter_->current_frame_number(); | 3095 return fps_counter_->current_frame_number(); |
| 3096 } | 3096 } |
| 3097 | 3097 |
| 3098 void LayerTreeHostImpl::StartAnimatingScrollbarAnimationController( | 3098 void LayerTreeHostImpl::StartAnimatingScrollbarAnimationController( |
| 3099 ScrollbarAnimationController* controller) { | 3099 ScrollbarAnimationController* controller) { |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3399 new_target.SetToMin(layer_impl->MaxScrollOffset()); | 3399 new_target.SetToMin(layer_impl->MaxScrollOffset()); |
| 3400 | 3400 |
| 3401 curve->UpdateTarget( | 3401 curve->UpdateTarget( |
| 3402 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) | 3402 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) |
| 3403 .InSecondsF(), | 3403 .InSecondsF(), |
| 3404 new_target); | 3404 new_target); |
| 3405 | 3405 |
| 3406 return true; | 3406 return true; |
| 3407 } | 3407 } |
| 3408 } // namespace cc | 3408 } // namespace cc |
| OLD | NEW |