| 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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 transform_node->transform_changed = true; | 593 transform_node->transform_changed = true; |
| 594 layer_tree_host_->property_trees()->transform_tree.set_needs_update(true); | 594 layer_tree_host_->property_trees()->transform_tree.set_needs_update(true); |
| 595 SetNeedsCommitNoRebuild(); | 595 SetNeedsCommitNoRebuild(); |
| 596 return; | 596 return; |
| 597 } | 597 } |
| 598 | 598 |
| 599 SetNeedsCommit(); | 599 SetNeedsCommit(); |
| 600 } | 600 } |
| 601 | 601 |
| 602 bool Layer::IsContainerForFixedPositionLayers() const { | 602 bool Layer::IsContainerForFixedPositionLayers() const { |
| 603 if (!inputs_.transform.IsIdentityOrTranslation()) | |
| 604 return true; | |
| 605 if (parent_ && !parent_->inputs_.transform.IsIdentityOrTranslation()) | |
| 606 return true; | |
| 607 return inputs_.is_container_for_fixed_position_layers; | 603 return inputs_.is_container_for_fixed_position_layers; |
| 608 } | 604 } |
| 609 | 605 |
| 610 bool Are2dAxisAligned(const gfx::Transform& a, const gfx::Transform& b) { | 606 bool Are2dAxisAligned(const gfx::Transform& a, const gfx::Transform& b) { |
| 611 if (a.IsScaleOrTranslation() && b.IsScaleOrTranslation()) { | 607 if (a.IsScaleOrTranslation() && b.IsScaleOrTranslation()) { |
| 612 return true; | 608 return true; |
| 613 } | 609 } |
| 614 | 610 |
| 615 gfx::Transform inverse(gfx::Transform::kSkipInitialization); | 611 gfx::Transform inverse(gfx::Transform::kSkipInitialization); |
| 616 if (b.GetInverse(&inverse)) { | 612 if (b.GetInverse(&inverse)) { |
| (...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1573 ->num_copy_requests_in_subtree; | 1569 ->num_copy_requests_in_subtree; |
| 1574 } | 1570 } |
| 1575 | 1571 |
| 1576 gfx::Transform Layer::screen_space_transform() const { | 1572 gfx::Transform Layer::screen_space_transform() const { |
| 1577 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); | 1573 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); |
| 1578 return draw_property_utils::ScreenSpaceTransform( | 1574 return draw_property_utils::ScreenSpaceTransform( |
| 1579 this, layer_tree_host_->property_trees()->transform_tree); | 1575 this, layer_tree_host_->property_trees()->transform_tree); |
| 1580 } | 1576 } |
| 1581 | 1577 |
| 1582 } // namespace cc | 1578 } // namespace cc |
| OLD | NEW |