Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 2930763002: Prevent create ScrollbarAnimationController for Mac Overlay Scrollbar (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/layers/scrollbar_layer_impl_base.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/layers/scrollbar_layer_impl_base.cc ('k') | cc/trees/layer_tree_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698