| 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 3737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3748 active_tree_->root_layer_for_testing()->LayerTreeAsJson()); | 3748 active_tree_->root_layer_for_testing()->LayerTreeAsJson()); |
| 3749 base::JSONWriter::WriteWithOptions( | 3749 base::JSONWriter::WriteWithOptions( |
| 3750 *json, base::JSONWriter::OPTIONS_PRETTY_PRINT, &str); | 3750 *json, base::JSONWriter::OPTIONS_PRETTY_PRINT, &str); |
| 3751 } | 3751 } |
| 3752 return str; | 3752 return str; |
| 3753 } | 3753 } |
| 3754 | 3754 |
| 3755 void LayerTreeHostImpl::RegisterScrollbarAnimationController( | 3755 void LayerTreeHostImpl::RegisterScrollbarAnimationController( |
| 3756 ElementId scroll_element_id, | 3756 ElementId scroll_element_id, |
| 3757 float scrollbar_opacity) { | 3757 float scrollbar_opacity) { |
| 3758 if (settings().scrollbar_animator == LayerTreeSettings::NO_ANIMATOR) | |
| 3759 return; | |
| 3760 if (ScrollbarAnimationControllerForElementId(scroll_element_id)) | 3758 if (ScrollbarAnimationControllerForElementId(scroll_element_id)) |
| 3761 return; | 3759 return; |
| 3762 | 3760 |
| 3763 scrollbar_animation_controllers_[scroll_element_id] = | 3761 scrollbar_animation_controllers_[scroll_element_id] = |
| 3764 active_tree_->CreateScrollbarAnimationController(scroll_element_id, | 3762 active_tree_->CreateScrollbarAnimationController(scroll_element_id, |
| 3765 scrollbar_opacity); | 3763 scrollbar_opacity); |
| 3766 } | 3764 } |
| 3767 | 3765 |
| 3768 void LayerTreeHostImpl::UnregisterScrollbarAnimationController( | 3766 void LayerTreeHostImpl::UnregisterScrollbarAnimationController( |
| 3769 ElementId scroll_element_id) { | 3767 ElementId scroll_element_id) { |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4303 | 4301 |
| 4304 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { | 4302 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { |
| 4305 if (!element_id) | 4303 if (!element_id) |
| 4306 return; | 4304 return; |
| 4307 if (ScrollbarAnimationController* animation_controller = | 4305 if (ScrollbarAnimationController* animation_controller = |
| 4308 ScrollbarAnimationControllerForElementId(element_id)) | 4306 ScrollbarAnimationControllerForElementId(element_id)) |
| 4309 animation_controller->DidScrollUpdate(); | 4307 animation_controller->DidScrollUpdate(); |
| 4310 } | 4308 } |
| 4311 | 4309 |
| 4312 } // namespace cc | 4310 } // namespace cc |
| OLD | NEW |