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

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

Issue 1850453002: cc : Fix bug in tree synchronization when mask layer changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 void LayerImpl::ClearChildList() { 144 void LayerImpl::ClearChildList() {
145 if (children_.empty()) 145 if (children_.empty())
146 return; 146 return;
147 for (auto* child : children_) 147 for (auto* child : children_)
148 layer_tree_impl_->RemoveLayer(child->id()); 148 layer_tree_impl_->RemoveLayer(child->id());
149 children_.clear(); 149 children_.clear();
150 } 150 }
151 151
152 void LayerImpl::ClearLinksToOtherLayers() {
153 children_.clear();
154 mask_layer_ = nullptr;
155 replica_layer_ = nullptr;
156 }
157
152 void LayerImpl::SetScrollParent(LayerImpl* parent) { 158 void LayerImpl::SetScrollParent(LayerImpl* parent) {
153 if (scroll_parent_ == parent) 159 if (scroll_parent_ == parent)
154 return; 160 return;
155 161
156 if (parent) 162 if (parent)
157 DCHECK_EQ(layer_tree_impl()->LayerById(parent->id()), parent); 163 DCHECK_EQ(layer_tree_impl()->LayerById(parent->id()), parent);
158 164
159 scroll_parent_ = parent; 165 scroll_parent_ = parent;
160 SetNeedsPushProperties(); 166 SetNeedsPushProperties();
161 } 167 }
(...skipping 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after
1604 .layer_transforms_should_scale_layer_contents) { 1610 .layer_transforms_should_scale_layer_contents) {
1605 return default_scale; 1611 return default_scale;
1606 } 1612 }
1607 1613
1608 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( 1614 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents(
1609 DrawTransform(), default_scale); 1615 DrawTransform(), default_scale);
1610 return std::max(transform_scales.x(), transform_scales.y()); 1616 return std::max(transform_scales.x(), transform_scales.y());
1611 } 1617 }
1612 1618
1613 } // namespace cc 1619 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698