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

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

Issue 2859483006: cc: Enable composited border-radius scrolling.
Patch Set: Make respect-clip-for-non-composited-scrollers-when-prefering-compositing-to-lcd-text.html not a re… 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
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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 if (inputs_.mask_layer.get() == mask_layer) 419 if (inputs_.mask_layer.get() == mask_layer)
420 return; 420 return;
421 if (inputs_.mask_layer.get()) { 421 if (inputs_.mask_layer.get()) {
422 DCHECK_EQ(this, inputs_.mask_layer->parent()); 422 DCHECK_EQ(this, inputs_.mask_layer->parent());
423 inputs_.mask_layer->RemoveFromParent(); 423 inputs_.mask_layer->RemoveFromParent();
424 } 424 }
425 inputs_.mask_layer = mask_layer; 425 inputs_.mask_layer = mask_layer;
426 if (inputs_.mask_layer.get()) { 426 if (inputs_.mask_layer.get()) {
427 // The mask layer should not have any children. 427 // The mask layer should not have any children.
428 DCHECK(inputs_.mask_layer->children().empty()); 428 DCHECK(inputs_.mask_layer->children().empty());
429 DCHECK_EQ(bounds().ToString(), inputs_.mask_layer->bounds().ToString());
trchen 2017/05/22 23:00:06 CLM updates layer geometry after attaching mask la
sunxd 2017/06/15 15:59:10 Done.
429 430
430 inputs_.mask_layer->RemoveFromParent(); 431 inputs_.mask_layer->RemoveFromParent();
431 DCHECK(!inputs_.mask_layer->parent()); 432 DCHECK(!inputs_.mask_layer->parent());
432 inputs_.mask_layer->SetParent(this); 433 inputs_.mask_layer->SetParent(this);
433 if (inputs_.filters.IsEmpty() && 434 if (inputs_.filters.IsEmpty() &&
434 (!layer_tree_host_ || 435 (!layer_tree_host_ ||
435 layer_tree_host_->GetSettings().enable_mask_tiling)) { 436 layer_tree_host_->GetSettings().enable_mask_tiling)) {
436 inputs_.mask_layer->SetLayerMaskType( 437 inputs_.mask_layer->SetLayerMaskType(
437 Layer::LayerMaskType::MULTI_TEXTURE_MASK); 438 Layer::LayerMaskType::MULTI_TEXTURE_MASK);
438 } else { 439 } else {
(...skipping 988 matching lines...) Expand 10 before | Expand all | Expand 10 after
1427 ->subtree_has_copy_request; 1428 ->subtree_has_copy_request;
1428 } 1429 }
1429 1430
1430 gfx::Transform Layer::ScreenSpaceTransform() const { 1431 gfx::Transform Layer::ScreenSpaceTransform() const {
1431 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); 1432 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId);
1432 return draw_property_utils::ScreenSpaceTransform( 1433 return draw_property_utils::ScreenSpaceTransform(
1433 this, layer_tree_host_->property_trees()->transform_tree); 1434 this, layer_tree_host_->property_trees()->transform_tree);
1434 } 1435 }
1435 1436
1436 } // namespace cc 1437 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698