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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1868 SetNeedsCommit(); | 1868 SetNeedsCommit(); |
1869 } | 1869 } |
1870 | 1870 |
1871 void Layer::RemoveAnimation(int animation_id, | 1871 void Layer::RemoveAnimation(int animation_id, |
1872 Animation::TargetProperty property) { | 1872 Animation::TargetProperty property) { |
1873 DCHECK(layer_animation_controller_); | 1873 DCHECK(layer_animation_controller_); |
1874 layer_animation_controller_->RemoveAnimation(animation_id, property); | 1874 layer_animation_controller_->RemoveAnimation(animation_id, property); |
1875 SetNeedsCommit(); | 1875 SetNeedsCommit(); |
1876 } | 1876 } |
1877 | 1877 |
| 1878 void Layer::AbortAnimation(int animation_id) { |
| 1879 DCHECK(layer_animation_controller_); |
| 1880 layer_animation_controller_->AbortAnimation(animation_id); |
| 1881 SetNeedsCommit(); |
| 1882 } |
| 1883 |
1878 void Layer::SetLayerAnimationControllerForTest( | 1884 void Layer::SetLayerAnimationControllerForTest( |
1879 scoped_refptr<LayerAnimationController> controller) { | 1885 scoped_refptr<LayerAnimationController> controller) { |
1880 DCHECK(layer_animation_controller_); | 1886 DCHECK(layer_animation_controller_); |
1881 layer_animation_controller_->RemoveValueObserver(this); | 1887 layer_animation_controller_->RemoveValueObserver(this); |
1882 layer_animation_controller_ = controller; | 1888 layer_animation_controller_ = controller; |
1883 layer_animation_controller_->AddValueObserver(this); | 1889 layer_animation_controller_->AddValueObserver(this); |
1884 SetNeedsCommit(); | 1890 SetNeedsCommit(); |
1885 } | 1891 } |
1886 | 1892 |
1887 bool Layer::HasActiveAnimation() const { | 1893 bool Layer::HasActiveAnimation() const { |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2036 this, layer_tree_host_->property_trees()->transform_tree); | 2042 this, layer_tree_host_->property_trees()->transform_tree); |
2037 } | 2043 } |
2038 | 2044 |
2039 gfx::Transform Layer::screen_space_transform() const { | 2045 gfx::Transform Layer::screen_space_transform() const { |
2040 DCHECK_NE(transform_tree_index_, -1); | 2046 DCHECK_NE(transform_tree_index_, -1); |
2041 return ScreenSpaceTransformFromPropertyTrees( | 2047 return ScreenSpaceTransformFromPropertyTrees( |
2042 this, layer_tree_host_->property_trees()->transform_tree); | 2048 this, layer_tree_host_->property_trees()->transform_tree); |
2043 } | 2049 } |
2044 | 2050 |
2045 } // namespace cc | 2051 } // namespace cc |
OLD | NEW |