OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 std::unique_ptr<CompositorAnimationTimeline> compositor_timeline = | 121 std::unique_ptr<CompositorAnimationTimeline> compositor_timeline = |
122 CompositorAnimationTimeline::Create(); | 122 CompositorAnimationTimeline::Create(); |
123 AnimationPlayerForTesting player; | 123 AnimationPlayerForTesting player; |
124 | 124 |
125 CompositorAnimationHost host(LayerTreeView()->CompositorAnimationHost()); | 125 CompositorAnimationHost host(LayerTreeView()->CompositorAnimationHost()); |
126 | 126 |
127 host.AddTimeline(*compositor_timeline); | 127 host.AddTimeline(*compositor_timeline); |
128 compositor_timeline->PlayerAttached(player); | 128 compositor_timeline->PlayerAttached(player); |
129 | 129 |
130 platform_layer_->SetElementId(CompositorElementId(platform_layer_->Id(), 0)); | 130 CompositorElementId element_id; |
| 131 element_id.id = platform_layer_->Id(); |
| 132 platform_layer_->SetElementId(element_id); |
131 | 133 |
132 player.CompositorPlayer()->AttachElement(platform_layer_->GetElementId()); | 134 player.CompositorPlayer()->AttachElement(platform_layer_->GetElementId()); |
133 ASSERT_TRUE(player.CompositorPlayer()->IsElementAttached()); | 135 ASSERT_TRUE(player.CompositorPlayer()->IsElementAttached()); |
134 | 136 |
135 player.CompositorPlayer()->AddAnimation(std::move(float_animation)); | 137 player.CompositorPlayer()->AddAnimation(std::move(float_animation)); |
136 | 138 |
137 ASSERT_TRUE(platform_layer_->HasTickingAnimationForTesting()); | 139 ASSERT_TRUE(platform_layer_->HasTickingAnimationForTesting()); |
138 | 140 |
139 graphics_layer_->SetShouldFlattenTransform(false); | 141 graphics_layer_->SetShouldFlattenTransform(false); |
140 | 142 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 return Platform::Current()->CurrentThread()->Scheduler()->TimerTaskRunner(); | 198 return Platform::Current()->CurrentThread()->Scheduler()->TimerTaskRunner(); |
197 } | 199 } |
198 | 200 |
199 DEFINE_INLINE_VIRTUAL_TRACE() { ScrollableArea::Trace(visitor); } | 201 DEFINE_INLINE_VIRTUAL_TRACE() { ScrollableArea::Trace(visitor); } |
200 | 202 |
201 private: | 203 private: |
202 ScrollOffset scroll_offset_; | 204 ScrollOffset scroll_offset_; |
203 }; | 205 }; |
204 | 206 |
205 } // namespace blink | 207 } // namespace blink |
OLD | NEW |