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 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 } | 990 } |
991 | 991 |
992 bool LayerImpl::HasPotentiallyRunningOpacityAnimation() const { | 992 bool LayerImpl::HasPotentiallyRunningOpacityAnimation() const { |
993 return layer_tree_impl_->HasPotentiallyRunningOpacityAnimation(this); | 993 return layer_tree_impl_->HasPotentiallyRunningOpacityAnimation(this); |
994 } | 994 } |
995 | 995 |
996 bool LayerImpl::OpacityIsAnimatingOnImplOnly() const { | 996 bool LayerImpl::OpacityIsAnimatingOnImplOnly() const { |
997 return layer_tree_impl_->OpacityIsAnimatingOnImplOnly(this); | 997 return layer_tree_impl_->OpacityIsAnimatingOnImplOnly(this); |
998 } | 998 } |
999 | 999 |
1000 void LayerImpl::SetElementId(uint64_t element_id) { | 1000 void LayerImpl::SetElementId(ElementId element_id) { |
1001 if (element_id == element_id_) | 1001 if (element_id == element_id_) |
1002 return; | 1002 return; |
1003 | 1003 |
1004 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), | 1004 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("compositor-worker"), |
1005 "LayerImpl::SetElementId", "id", element_id); | 1005 "LayerImpl::SetElementId", "id", element_id); |
1006 | 1006 |
1007 layer_tree_impl_->RemoveFromElementMap(this); | 1007 layer_tree_impl_->RemoveFromElementMap(this); |
1008 element_id_ = element_id; | 1008 element_id_ = element_id; |
1009 layer_tree_impl_->AddToElementMap(this); | 1009 layer_tree_impl_->AddToElementMap(this); |
1010 SetNeedsPushProperties(); | 1010 SetNeedsPushProperties(); |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1392 .layer_transforms_should_scale_layer_contents) { | 1392 .layer_transforms_should_scale_layer_contents) { |
1393 return default_scale; | 1393 return default_scale; |
1394 } | 1394 } |
1395 | 1395 |
1396 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( | 1396 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( |
1397 DrawTransform(), default_scale); | 1397 DrawTransform(), default_scale); |
1398 return std::max(transform_scales.x(), transform_scales.y()); | 1398 return std::max(transform_scales.x(), transform_scales.y()); |
1399 } | 1399 } |
1400 | 1400 |
1401 } // namespace cc | 1401 } // namespace cc |
OLD | NEW |