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

Side by Side Diff: cc/layers/layer_impl.cc

Issue 2365793002: Fix scroll chaining for non-descendants of root scroller. (Closed)
Patch Set: Rebase and remove hack Created 4 years, 2 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/layer_impl.h ('k') | cc/layers/viewport.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layers/layer_impl.h" 5 #include "cc/layers/layer_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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 void LayerImpl::SetDebugInfo( 118 void LayerImpl::SetDebugInfo(
119 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> debug_info) { 119 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> debug_info) {
120 owned_debug_info_ = std::move(debug_info); 120 owned_debug_info_ = std::move(debug_info);
121 debug_info_ = owned_debug_info_.get(); 121 debug_info_ = owned_debug_info_.get();
122 SetNeedsPushProperties(); 122 SetNeedsPushProperties();
123 } 123 }
124 124
125 void LayerImpl::DistributeScroll(ScrollState* scroll_state) { 125 void LayerImpl::DistributeScroll(ScrollState* scroll_state) {
126 ScrollTree& scroll_tree = layer_tree_impl()->property_trees()->scroll_tree; 126 ScrollTree& scroll_tree = layer_tree_impl()->property_trees()->scroll_tree;
127 ScrollNode* scroll_node = scroll_tree.Node(scroll_tree_index()); 127 ScrollNode* scroll_node = scroll_tree.Node(scroll_tree_index());
128 return scroll_tree.DistributeScroll(scroll_node, scroll_state); 128 scroll_tree.DistributeScroll(scroll_node, scroll_state);
129 }
130
131 void LayerImpl::ApplyScroll(ScrollState* scroll_state) {
132 DCHECK(scroll_state);
133 ScrollNode* node = layer_tree_impl()->property_trees()->scroll_tree.Node(
134 scroll_tree_index());
135 layer_tree_impl()->ApplyScroll(node, scroll_state);
136 } 129 }
137 130
138 void LayerImpl::SetTransformTreeIndex(int index) { 131 void LayerImpl::SetTransformTreeIndex(int index) {
139 transform_tree_index_ = index; 132 transform_tree_index_ = index;
140 } 133 }
141 134
142 void LayerImpl::SetClipTreeIndex(int index) { 135 void LayerImpl::SetClipTreeIndex(int index) {
143 clip_tree_index_ = index; 136 clip_tree_index_ = index;
144 } 137 }
145 138
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 .layer_transforms_should_scale_layer_contents) { 1081 .layer_transforms_should_scale_layer_contents) {
1089 return default_scale; 1082 return default_scale;
1090 } 1083 }
1091 1084
1092 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( 1085 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents(
1093 ScreenSpaceTransform(), default_scale); 1086 ScreenSpaceTransform(), default_scale);
1094 return std::max(transform_scales.x(), transform_scales.y()); 1087 return std::max(transform_scales.x(), transform_scales.y());
1095 } 1088 }
1096 1089
1097 } // namespace cc 1090 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl.h ('k') | cc/layers/viewport.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698