OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_impl.h" | 5 #include "cc/layers/layer_impl.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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 layer_tree_impl_->AddToElementMap(this); | 89 layer_tree_impl_->AddToElementMap(this); |
90 | 90 |
91 SetNeedsPushProperties(); | 91 SetNeedsPushProperties(); |
92 } | 92 } |
93 | 93 |
94 LayerImpl::~LayerImpl() { | 94 LayerImpl::~LayerImpl() { |
95 DCHECK_EQ(DRAW_MODE_NONE, current_draw_mode_); | 95 DCHECK_EQ(DRAW_MODE_NONE, current_draw_mode_); |
96 | 96 |
97 layer_tree_impl_->UnregisterScrollLayer(this); | 97 layer_tree_impl_->UnregisterScrollLayer(this); |
98 layer_tree_impl_->UnregisterLayer(this); | 98 layer_tree_impl_->UnregisterLayer(this); |
99 layer_tree_impl_->RemoveLayerShouldPushProperties(this); | |
100 | 99 |
101 layer_tree_impl_->RemoveFromElementMap(this); | 100 layer_tree_impl_->RemoveFromElementMap(this); |
102 | 101 |
103 TRACE_EVENT_OBJECT_DELETED_WITH_ID( | 102 TRACE_EVENT_OBJECT_DELETED_WITH_ID( |
104 TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerImpl", this); | 103 TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerImpl", this); |
105 } | 104 } |
106 | 105 |
107 void LayerImpl::SetHasWillChangeTransformHint(bool has_will_change) { | 106 void LayerImpl::SetHasWillChangeTransformHint(bool has_will_change) { |
108 has_will_change_transform_hint_ = has_will_change; | 107 has_will_change_transform_hint_ = has_will_change; |
109 } | 108 } |
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1195 .layer_transforms_should_scale_layer_contents) { | 1194 .layer_transforms_should_scale_layer_contents) { |
1196 return default_scale; | 1195 return default_scale; |
1197 } | 1196 } |
1198 | 1197 |
1199 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( | 1198 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( |
1200 ScreenSpaceTransform(), default_scale); | 1199 ScreenSpaceTransform(), default_scale); |
1201 return std::max(transform_scales.x(), transform_scales.y()); | 1200 return std::max(transform_scales.x(), transform_scales.y()); |
1202 } | 1201 } |
1203 | 1202 |
1204 } // namespace cc | 1203 } // namespace cc |
OLD | NEW |