Chromium Code Reviews| 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 3723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3734 active_tree_->root_layer_for_testing()->LayerTreeAsJson()); | 3734 active_tree_->root_layer_for_testing()->LayerTreeAsJson()); |
| 3735 base::JSONWriter::WriteWithOptions( | 3735 base::JSONWriter::WriteWithOptions( |
| 3736 *json, base::JSONWriter::OPTIONS_PRETTY_PRINT, &str); | 3736 *json, base::JSONWriter::OPTIONS_PRETTY_PRINT, &str); |
| 3737 } | 3737 } |
| 3738 return str; | 3738 return str; |
| 3739 } | 3739 } |
| 3740 | 3740 |
| 3741 void LayerTreeHostImpl::RegisterScrollbarAnimationController( | 3741 void LayerTreeHostImpl::RegisterScrollbarAnimationController( |
| 3742 ElementId scroll_element_id, | 3742 ElementId scroll_element_id, |
| 3743 float scrollbar_opacity) { | 3743 float scrollbar_opacity) { |
| 3744 if (settings().scrollbar_animator == LayerTreeSettings::NO_ANIMATOR) | |
|
aelias_OOO_until_Jul13
2017/06/02 22:02:23
Why is this removed?
chaopeng
2017/06/05 14:52:40
Moved to LayerTreeImpl::RegisterScrollbar.
| |
| 3745 return; | |
| 3746 if (ScrollbarAnimationControllerForElementId(scroll_element_id)) | 3744 if (ScrollbarAnimationControllerForElementId(scroll_element_id)) |
| 3747 return; | 3745 return; |
| 3748 | 3746 |
| 3749 scrollbar_animation_controllers_[scroll_element_id] = | 3747 scrollbar_animation_controllers_[scroll_element_id] = |
| 3750 active_tree_->CreateScrollbarAnimationController(scroll_element_id, | 3748 active_tree_->CreateScrollbarAnimationController(scroll_element_id, |
| 3751 scrollbar_opacity); | 3749 scrollbar_opacity); |
| 3752 } | 3750 } |
| 3753 | 3751 |
| 3754 void LayerTreeHostImpl::UnregisterScrollbarAnimationController( | 3752 void LayerTreeHostImpl::UnregisterScrollbarAnimationController( |
| 3755 ElementId scroll_element_id) { | 3753 ElementId scroll_element_id) { |
| (...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4289 | 4287 |
| 4290 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { | 4288 void LayerTreeHostImpl::ShowScrollbarsForImplScroll(ElementId element_id) { |
| 4291 if (!element_id) | 4289 if (!element_id) |
| 4292 return; | 4290 return; |
| 4293 if (ScrollbarAnimationController* animation_controller = | 4291 if (ScrollbarAnimationController* animation_controller = |
| 4294 ScrollbarAnimationControllerForElementId(element_id)) | 4292 ScrollbarAnimationControllerForElementId(element_id)) |
| 4295 animation_controller->DidScrollUpdate(); | 4293 animation_controller->DidScrollUpdate(); |
| 4296 } | 4294 } |
| 4297 | 4295 |
| 4298 } // namespace cc | 4296 } // namespace cc |
| OLD | NEW |