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

Side by Side Diff: cc/layers/layer.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
« no previous file with comments | « no previous file | cc/layers/layer_impl.h » ('j') | cc/trees/layer_tree_host_unittest.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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.h" 5 #include "cc/layers/layer.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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 void Layer::SetMaskLayer(Layer* mask_layer) { 409 void Layer::SetMaskLayer(Layer* mask_layer) {
410 DCHECK(IsPropertyChangeAllowed()); 410 DCHECK(IsPropertyChangeAllowed());
411 if (mask_layer_.get() == mask_layer) 411 if (mask_layer_.get() == mask_layer)
412 return; 412 return;
413 if (mask_layer_.get()) { 413 if (mask_layer_.get()) {
414 DCHECK_EQ(this, mask_layer_->parent()); 414 DCHECK_EQ(this, mask_layer_->parent());
415 mask_layer_->RemoveFromParent(); 415 mask_layer_->RemoveFromParent();
416 } 416 }
417 mask_layer_ = mask_layer; 417 mask_layer_ = mask_layer;
418 if (mask_layer_.get()) { 418 if (mask_layer_.get()) {
419 mask_layer_->RemoveFromParent();
419 DCHECK(!mask_layer_->parent()); 420 DCHECK(!mask_layer_->parent());
420 mask_layer_->RemoveFromParent();
421 mask_layer_->SetParent(this); 421 mask_layer_->SetParent(this);
422 mask_layer_->SetIsMask(true); 422 mask_layer_->SetIsMask(true);
423 } 423 }
424 SetSubtreePropertyChanged(); 424 SetSubtreePropertyChanged();
425 SetNeedsFullTreeSync(); 425 SetNeedsFullTreeSync();
426 } 426 }
427 427
428 void Layer::SetReplicaLayer(Layer* layer) { 428 void Layer::SetReplicaLayer(Layer* layer) {
429 DCHECK(IsPropertyChangeAllowed()); 429 DCHECK(IsPropertyChangeAllowed());
430 if (replica_layer_.get() == layer) 430 if (replica_layer_.get() == layer)
(...skipping 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1845 this, layer_tree_host_->property_trees()->transform_tree); 1845 this, layer_tree_host_->property_trees()->transform_tree);
1846 } 1846 }
1847 1847
1848 gfx::Transform Layer::screen_space_transform() const { 1848 gfx::Transform Layer::screen_space_transform() const {
1849 DCHECK_NE(transform_tree_index_, -1); 1849 DCHECK_NE(transform_tree_index_, -1);
1850 return draw_property_utils::ScreenSpaceTransform( 1850 return draw_property_utils::ScreenSpaceTransform(
1851 this, layer_tree_host_->property_trees()->transform_tree); 1851 this, layer_tree_host_->property_trees()->transform_tree);
1852 } 1852 }
1853 1853
1854 } // namespace cc 1854 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer_impl.h » ('j') | cc/trees/layer_tree_host_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698