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

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

Issue 2882403002: Remove redundant update of viewport layer types (Closed)
Patch Set: patch Created 3 years, 7 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 | « no previous file | cc/trees/layer_tree_impl.h » ('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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 return scroll_tree.ScrollBy(scroll_node, scroll, layer_tree_impl()); 273 return scroll_tree.ScrollBy(scroll_node, scroll, layer_tree_impl());
274 } 274 }
275 275
276 void LayerImpl::SetScrollClipLayer(int scroll_clip_layer_id) { 276 void LayerImpl::SetScrollClipLayer(int scroll_clip_layer_id) {
277 if (scroll_clip_layer_id_ == scroll_clip_layer_id) 277 if (scroll_clip_layer_id_ == scroll_clip_layer_id)
278 return; 278 return;
279 279
280 layer_tree_impl()->UnregisterScrollLayer(this); 280 layer_tree_impl()->UnregisterScrollLayer(this);
281 scroll_clip_layer_id_ = scroll_clip_layer_id; 281 scroll_clip_layer_id_ = scroll_clip_layer_id;
282 layer_tree_impl()->RegisterScrollLayer(this); 282 layer_tree_impl()->RegisterScrollLayer(this);
283
284 // Ensure our viewport layer type is updated.
285 layer_tree_impl()->UpdateViewportLayerTypes();
286 } 283 }
287 284
288 LayerImpl* LayerImpl::scroll_clip_layer() const { 285 LayerImpl* LayerImpl::scroll_clip_layer() const {
289 return layer_tree_impl()->LayerById(scroll_clip_layer_id_); 286 return layer_tree_impl()->LayerById(scroll_clip_layer_id_);
290 } 287 }
291 288
292 bool LayerImpl::scrollable() const { 289 bool LayerImpl::scrollable() const {
293 return scroll_clip_layer_id_ != Layer::INVALID_ID; 290 return scroll_clip_layer_id_ != Layer::INVALID_ID;
294 } 291 }
295 292
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 980
984 ScrollTree& LayerImpl::GetScrollTree() const { 981 ScrollTree& LayerImpl::GetScrollTree() const {
985 return GetPropertyTrees()->scroll_tree; 982 return GetPropertyTrees()->scroll_tree;
986 } 983 }
987 984
988 TransformTree& LayerImpl::GetTransformTree() const { 985 TransformTree& LayerImpl::GetTransformTree() const {
989 return GetPropertyTrees()->transform_tree; 986 return GetPropertyTrees()->transform_tree;
990 } 987 }
991 988
992 } // namespace cc 989 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698