| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 3734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3745 active_tree_->root_layer_for_testing()->LayerTreeAsJson()); | 3745 active_tree_->root_layer_for_testing()->LayerTreeAsJson()); |
| 3746 base::JSONWriter::WriteWithOptions( | 3746 base::JSONWriter::WriteWithOptions( |
| 3747 *json, base::JSONWriter::OPTIONS_PRETTY_PRINT, &str); | 3747 *json, base::JSONWriter::OPTIONS_PRETTY_PRINT, &str); |
| 3748 } | 3748 } |
| 3749 return str; | 3749 return str; |
| 3750 } | 3750 } |
| 3751 | 3751 |
| 3752 void LayerTreeHostImpl::RegisterScrollbarAnimationController( | 3752 void LayerTreeHostImpl::RegisterScrollbarAnimationController( |
| 3753 ElementId scroll_element_id, | 3753 ElementId scroll_element_id, |
| 3754 float scrollbar_opacity) { | 3754 float scrollbar_opacity) { |
| 3755 if (settings().scrollbar_animator == LayerTreeSettings::NO_ANIMATOR) | |
| 3756 return; | |
| 3757 if (ScrollbarAnimationControllerForElementId(scroll_element_id)) | 3755 if (ScrollbarAnimationControllerForElementId(scroll_element_id)) |
| 3758 return; | 3756 return; |
| 3759 | 3757 |
| 3760 scrollbar_animation_controllers_[scroll_element_id] = | 3758 scrollbar_animation_controllers_[scroll_element_id] = |
| 3761 active_tree_->CreateScrollbarAnimationController(scroll_element_id, | 3759 active_tree_->CreateScrollbarAnimationController(scroll_element_id, |
| 3762 scrollbar_opacity); | 3760 scrollbar_opacity); |
| 3763 } | 3761 } |
| 3764 | 3762 |
| 3765 void LayerTreeHostImpl::UnregisterScrollbarAnimationController( | 3763 void LayerTreeHostImpl::UnregisterScrollbarAnimationController( |
| 3766 ElementId scroll_element_id) { | 3764 ElementId scroll_element_id) { |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4356 | 4354 |
| 4357 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { | 4355 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { |
| 4358 if (!element_id) | 4356 if (!element_id) |
| 4359 return; | 4357 return; |
| 4360 if (ScrollbarAnimationController* animation_controller = | 4358 if (ScrollbarAnimationController* animation_controller = |
| 4361 ScrollbarAnimationControllerForElementId(element_id)) | 4359 ScrollbarAnimationControllerForElementId(element_id)) |
| 4362 animation_controller->DidScrollUpdate(); | 4360 animation_controller->DidScrollUpdate(); |
| 4363 } | 4361 } |
| 4364 | 4362 |
| 4365 } // namespace cc | 4363 } // namespace cc |
| OLD | NEW |