OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/compositor/layer_owner.h" | 5 #include "ui/compositor/layer_owner.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/test/null_task_runner.h" | 9 #include "base/test/null_task_runner.h" |
10 #include "cc/animation/animation_player.h" | 10 #include "cc/animation/animation_player.h" |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 | 74 |
75 ui::ContextFactory* context_factory = nullptr; | 75 ui::ContextFactory* context_factory = nullptr; |
76 ui::ContextFactoryPrivate* context_factory_private = nullptr; | 76 ui::ContextFactoryPrivate* context_factory_private = nullptr; |
77 | 77 |
78 ui::InitializeContextFactoryForTests(false, &context_factory, | 78 ui::InitializeContextFactoryForTests(false, &context_factory, |
79 &context_factory_private); | 79 &context_factory_private); |
80 | 80 |
81 compositor_.reset( | 81 compositor_.reset( |
82 new ui::Compositor(context_factory_private->AllocateFrameSinkId(), | 82 new ui::Compositor(context_factory_private->AllocateFrameSinkId(), |
83 context_factory, context_factory_private, task_runner, | 83 context_factory, context_factory_private, task_runner, |
84 false /* enable_surface_synchronization */)); | 84 false /* enable_surface_synchronization */, |
| 85 false /* enable_pixel_canvas */)); |
85 compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); | 86 compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); |
86 } | 87 } |
87 | 88 |
88 void LayerOwnerTestWithCompositor::TearDown() { | 89 void LayerOwnerTestWithCompositor::TearDown() { |
89 compositor_.reset(); | 90 compositor_.reset(); |
90 ui::TerminateContextFactoryForTests(); | 91 ui::TerminateContextFactoryForTests(); |
91 } | 92 } |
92 | 93 |
93 } // namespace | 94 } // namespace |
94 | 95 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 | 209 |
209 layer->SetOpacity(0.5f); | 210 layer->SetOpacity(0.5f); |
210 | 211 |
211 scoped_refptr<cc::AnimationPlayer> player = | 212 scoped_refptr<cc::AnimationPlayer> player = |
212 layer->GetAnimator()->GetAnimationPlayerForTesting(); | 213 layer->GetAnimator()->GetAnimationPlayerForTesting(); |
213 EXPECT_TRUE(player); | 214 EXPECT_TRUE(player); |
214 EXPECT_TRUE(player->animation_timeline()); | 215 EXPECT_TRUE(player->animation_timeline()); |
215 } | 216 } |
216 | 217 |
217 } // namespace ui | 218 } // namespace ui |
OLD | NEW |