| 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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "cc/animation/animation_curve.h" | 9 #include "cc/animation/animation_curve.h" |
| 10 #include "cc/animation/animation_host.h" | 10 #include "cc/animation/animation_host.h" |
| (...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1171 // Add a translate from 6,7 to 8,9. | 1171 // Add a translate from 6,7 to 8,9. |
| 1172 TransformOperations start; | 1172 TransformOperations start; |
| 1173 start.AppendTranslate(6.f, 7.f, 0.f); | 1173 start.AppendTranslate(6.f, 7.f, 0.f); |
| 1174 TransformOperations end; | 1174 TransformOperations end; |
| 1175 end.AppendTranslate(8.f, 9.f, 0.f); | 1175 end.AppendTranslate(8.f, 9.f, 0.f); |
| 1176 AddAnimatedTransformToPlayer(player_.get(), 4.0, start, end); | 1176 AddAnimatedTransformToPlayer(player_.get(), 4.0, start, end); |
| 1177 | 1177 |
| 1178 PostSetNeedsCommitToMainThread(); | 1178 PostSetNeedsCommitToMainThread(); |
| 1179 } | 1179 } |
| 1180 | 1180 |
| 1181 void WillPrepareTiles(LayerTreeHostImpl* host_impl) override { | 1181 void WillPrepareTilesOnThread(LayerTreeHostImpl* host_impl) override { |
| 1182 if (host_impl->sync_tree()->source_frame_number() != 0) | 1182 if (host_impl->sync_tree()->source_frame_number() != 0) |
| 1183 return; | 1183 return; |
| 1184 | 1184 |
| 1185 // After checking this on the sync tree, we will activate, which will cause | 1185 // After checking this on the sync tree, we will activate, which will cause |
| 1186 // PrepareTiles to happen again (which races with the test exiting). | 1186 // PrepareTiles to happen again (which races with the test exiting). |
| 1187 if (TestEnded()) | 1187 if (TestEnded()) |
| 1188 return; | 1188 return; |
| 1189 | 1189 |
| 1190 scoped_refptr<AnimationTimeline> timeline_impl = | 1190 scoped_refptr<AnimationTimeline> timeline_impl = |
| 1191 host_impl->animation_host()->GetTimelineById(timeline_id_); | 1191 host_impl->animation_host()->GetTimelineById(timeline_id_); |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1855 private: | 1855 private: |
| 1856 scoped_refptr<Layer> layer_; | 1856 scoped_refptr<Layer> layer_; |
| 1857 FakeContentLayerClient client_; | 1857 FakeContentLayerClient client_; |
| 1858 }; | 1858 }; |
| 1859 | 1859 |
| 1860 MULTI_THREAD_TEST_F( | 1860 MULTI_THREAD_TEST_F( |
| 1861 LayerTreeHostAnimationTestRebuildPropertyTreesOnAnimationSetNeedsCommit); | 1861 LayerTreeHostAnimationTestRebuildPropertyTreesOnAnimationSetNeedsCommit); |
| 1862 | 1862 |
| 1863 } // namespace | 1863 } // namespace |
| 1864 } // namespace cc | 1864 } // namespace cc |
| OLD | NEW |