OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "content/browser/compositor/reflector_impl.h" | 5 #include "content/browser/compositor/reflector_impl.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 ImageTransportFactory::InitializeForUnitTests( | 136 ImageTransportFactory::InitializeForUnitTests( |
137 base::MakeUnique<NoTransportImageTransportFactory>()); | 137 base::MakeUnique<NoTransportImageTransportFactory>()); |
138 task_runner_ = message_loop_->task_runner(); | 138 task_runner_ = message_loop_->task_runner(); |
139 compositor_task_runner_ = new FakeTaskRunner(); | 139 compositor_task_runner_ = new FakeTaskRunner(); |
140 begin_frame_source_.reset(new viz::DelayBasedBeginFrameSource( | 140 begin_frame_source_.reset(new viz::DelayBasedBeginFrameSource( |
141 base::MakeUnique<viz::DelayBasedTimeSource>( | 141 base::MakeUnique<viz::DelayBasedTimeSource>( |
142 compositor_task_runner_.get()))); | 142 compositor_task_runner_.get()))); |
143 compositor_.reset(new ui::Compositor( | 143 compositor_.reset(new ui::Compositor( |
144 context_factory_private->AllocateFrameSinkId(), context_factory, | 144 context_factory_private->AllocateFrameSinkId(), context_factory, |
145 context_factory_private, compositor_task_runner_.get(), | 145 context_factory_private, compositor_task_runner_.get(), |
146 false /* enable_surface_synchronization */)); | 146 false /* enable_surface_synchronization */, |
| 147 false /* enable_pixel_canvas */)); |
147 compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); | 148 compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); |
148 | 149 |
149 auto context_provider = cc::TestContextProvider::Create(); | 150 auto context_provider = cc::TestContextProvider::Create(); |
150 context_provider->BindToCurrentThread(); | 151 context_provider->BindToCurrentThread(); |
151 output_surface_ = | 152 output_surface_ = |
152 base::MakeUnique<TestOutputSurface>(std::move(context_provider)); | 153 base::MakeUnique<TestOutputSurface>(std::move(context_provider)); |
153 | 154 |
154 root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); | 155 root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); |
155 compositor_->SetRootLayer(root_layer_.get()); | 156 compositor_->SetRootLayer(root_layer_.get()); |
156 mirroring_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); | 157 mirroring_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 plane_2.plane_z_order = 1; | 235 plane_2.plane_z_order = 1; |
235 list.push_back(plane_1); | 236 list.push_back(plane_1); |
236 list.push_back(plane_2); | 237 list.push_back(plane_2); |
237 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); | 238 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); |
238 EXPECT_FALSE(list[0].overlay_handled); | 239 EXPECT_FALSE(list[0].overlay_handled); |
239 } | 240 } |
240 #endif // defined(USE_OZONE) | 241 #endif // defined(USE_OZONE) |
241 | 242 |
242 } // namespace | 243 } // namespace |
243 } // namespace content | 244 } // namespace content |
OLD | NEW |