| OLD | NEW |
| 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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 if (inputs_.clip_parent) | 728 if (inputs_.clip_parent) |
| 729 inputs_.clip_parent->RemoveClipChild(this); | 729 inputs_.clip_parent->RemoveClipChild(this); |
| 730 | 730 |
| 731 inputs_.clip_parent = ancestor; | 731 inputs_.clip_parent = ancestor; |
| 732 | 732 |
| 733 if (inputs_.clip_parent) | 733 if (inputs_.clip_parent) |
| 734 inputs_.clip_parent->AddClipChild(this); | 734 inputs_.clip_parent->AddClipChild(this); |
| 735 | 735 |
| 736 SetPropertyTreesNeedRebuild(); | 736 SetPropertyTreesNeedRebuild(); |
| 737 SetNeedsCommit(); | 737 SetNeedsCommit(); |
| 738 if (layer_tree_host_) | |
| 739 layer_tree_host_->SetNeedsMetaInfoRecomputation(true); | |
| 740 } | 738 } |
| 741 | 739 |
| 742 void Layer::AddClipChild(Layer* child) { | 740 void Layer::AddClipChild(Layer* child) { |
| 743 if (!clip_children_) | 741 if (!clip_children_) |
| 744 clip_children_.reset(new std::set<Layer*>); | 742 clip_children_.reset(new std::set<Layer*>); |
| 745 clip_children_->insert(child); | 743 clip_children_->insert(child); |
| 746 SetNeedsCommit(); | 744 SetNeedsCommit(); |
| 747 } | 745 } |
| 748 | 746 |
| 749 void Layer::RemoveClipChild(Layer* child) { | 747 void Layer::RemoveClipChild(Layer* child) { |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1442 ->num_copy_requests_in_subtree; | 1440 ->num_copy_requests_in_subtree; |
| 1443 } | 1441 } |
| 1444 | 1442 |
| 1445 gfx::Transform Layer::screen_space_transform() const { | 1443 gfx::Transform Layer::screen_space_transform() const { |
| 1446 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); | 1444 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); |
| 1447 return draw_property_utils::ScreenSpaceTransform( | 1445 return draw_property_utils::ScreenSpaceTransform( |
| 1448 this, layer_tree_host_->property_trees()->transform_tree); | 1446 this, layer_tree_host_->property_trees()->transform_tree); |
| 1449 } | 1447 } |
| 1450 | 1448 |
| 1451 } // namespace cc | 1449 } // namespace cc |
| OLD | NEW |