| 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 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1294 return; | 1294 return; |
| 1295 may_contain_video_ = yes; | 1295 may_contain_video_ = yes; |
| 1296 SetNeedsPushProperties(); | 1296 SetNeedsPushProperties(); |
| 1297 } | 1297 } |
| 1298 | 1298 |
| 1299 void Layer::SetScrollbarsHiddenFromImplSide(bool hidden) { | 1299 void Layer::SetScrollbarsHiddenFromImplSide(bool hidden) { |
| 1300 if (inputs_.client) | 1300 if (inputs_.client) |
| 1301 inputs_.client->didChangeScrollbarsHidden(hidden); | 1301 inputs_.client->didChangeScrollbarsHidden(hidden); |
| 1302 } | 1302 } |
| 1303 | 1303 |
| 1304 bool Layer::TransformIsAnimating() const { | |
| 1305 return GetMutatorHost()->IsAnimatingTransformProperty( | |
| 1306 element_id(), GetElementTypeForAnimation()); | |
| 1307 } | |
| 1308 | |
| 1309 gfx::ScrollOffset Layer::ScrollOffsetForAnimation() const { | 1304 gfx::ScrollOffset Layer::ScrollOffsetForAnimation() const { |
| 1310 return CurrentScrollOffset(); | 1305 return CurrentScrollOffset(); |
| 1311 } | 1306 } |
| 1312 | 1307 |
| 1313 // On<Property>Animated is called due to an ongoing accelerated animation. | 1308 // On<Property>Animated is called due to an ongoing accelerated animation. |
| 1314 // Since this animation is also being run on the compositor thread, there | 1309 // Since this animation is also being run on the compositor thread, there |
| 1315 // is no need to request a commit to push this value over, so the value is | 1310 // is no need to request a commit to push this value over, so the value is |
| 1316 // set directly rather than by calling Set<Property>. | 1311 // set directly rather than by calling Set<Property>. |
| 1317 void Layer::OnFilterAnimated(const FilterOperations& filters) { | 1312 void Layer::OnFilterAnimated(const FilterOperations& filters) { |
| 1318 inputs_.filters = filters; | 1313 inputs_.filters = filters; |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1431 ->subtree_has_copy_request; | 1426 ->subtree_has_copy_request; |
| 1432 } | 1427 } |
| 1433 | 1428 |
| 1434 gfx::Transform Layer::ScreenSpaceTransform() const { | 1429 gfx::Transform Layer::ScreenSpaceTransform() const { |
| 1435 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); | 1430 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); |
| 1436 return draw_property_utils::ScreenSpaceTransform( | 1431 return draw_property_utils::ScreenSpaceTransform( |
| 1437 this, layer_tree_host_->property_trees()->transform_tree); | 1432 this, layer_tree_host_->property_trees()->transform_tree); |
| 1438 } | 1433 } |
| 1439 | 1434 |
| 1440 } // namespace cc | 1435 } // namespace cc |
| OLD | NEW |