| 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 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1710 num_descendants_that_draw_content_ += num; | 1710 num_descendants_that_draw_content_ += num; |
| 1711 SetNeedsCommit(); | 1711 SetNeedsCommit(); |
| 1712 if (parent()) | 1712 if (parent()) |
| 1713 parent()->AddDrawableDescendants(num); | 1713 parent()->AddDrawableDescendants(num); |
| 1714 } | 1714 } |
| 1715 | 1715 |
| 1716 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) { | 1716 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) { |
| 1717 benchmark->RunOnLayer(this); | 1717 benchmark->RunOnLayer(this); |
| 1718 } | 1718 } |
| 1719 | 1719 |
| 1720 void Layer::SetElementId(uint64_t id) { | 1720 void Layer::SetElementId(ElementId id) { |
| 1721 DCHECK(IsPropertyChangeAllowed()); | 1721 DCHECK(IsPropertyChangeAllowed()); |
| 1722 if (element_id_ == id) | 1722 if (element_id_ == id) |
| 1723 return; | 1723 return; |
| 1724 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), | 1724 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), |
| 1725 "Layer::SetElementId", "id", id); | 1725 "Layer::SetElementId", "id", id); |
| 1726 element_id_ = id; | 1726 element_id_ = id; |
| 1727 SetNeedsCommit(); | 1727 SetNeedsCommit(); |
| 1728 } | 1728 } |
| 1729 | 1729 |
| 1730 void Layer::SetMutableProperties(uint32_t properties) { | 1730 void Layer::SetMutableProperties(uint32_t properties) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1752 ->data.num_copy_requests_in_subtree; | 1752 ->data.num_copy_requests_in_subtree; |
| 1753 } | 1753 } |
| 1754 | 1754 |
| 1755 gfx::Transform Layer::screen_space_transform() const { | 1755 gfx::Transform Layer::screen_space_transform() const { |
| 1756 DCHECK_NE(transform_tree_index_, -1); | 1756 DCHECK_NE(transform_tree_index_, -1); |
| 1757 return draw_property_utils::ScreenSpaceTransform( | 1757 return draw_property_utils::ScreenSpaceTransform( |
| 1758 this, layer_tree_host_->property_trees()->transform_tree); | 1758 this, layer_tree_host_->property_trees()->transform_tree); |
| 1759 } | 1759 } |
| 1760 | 1760 |
| 1761 } // namespace cc | 1761 } // namespace cc |
| OLD | NEW |