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 "base/memory/ptr_util.h" | 5 #include "base/memory/ptr_util.h" |
6 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
7 #include "base/single_thread_task_runner.h" | 7 #include "base/single_thread_task_runner.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "cc/output/compositor_frame.h" | 9 #include "cc/output/compositor_frame.h" |
10 #include "cc/scheduler/begin_frame_source.h" | 10 #include "cc/scheduler/begin_frame_source.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 reflector_ = base::WrapUnique( | 156 reflector_ = base::WrapUnique( |
157 new ReflectorImpl(compositor_.get(), mirroring_layer_.get())); | 157 new ReflectorImpl(compositor_.get(), mirroring_layer_.get())); |
158 reflector_->OnSourceSurfaceReady(output_surface_.get()); | 158 reflector_->OnSourceSurfaceReady(output_surface_.get()); |
159 } | 159 } |
160 | 160 |
161 void TearDown() override { | 161 void TearDown() override { |
162 if (reflector_) | 162 if (reflector_) |
163 reflector_->RemoveMirroringLayer(mirroring_layer_.get()); | 163 reflector_->RemoveMirroringLayer(mirroring_layer_.get()); |
164 cc::TextureMailbox mailbox; | 164 cc::TextureMailbox mailbox; |
165 std::unique_ptr<cc::SingleReleaseCallback> release; | 165 std::unique_ptr<cc::SingleReleaseCallback> release; |
166 if (mirroring_layer_->PrepareTextureMailbox(&mailbox, &release, false)) { | 166 if (mirroring_layer_->PrepareTextureMailbox(&mailbox, &release)) { |
167 release->Run(gpu::SyncToken(), false); | 167 release->Run(gpu::SyncToken(), false); |
168 } | 168 } |
169 compositor_.reset(); | 169 compositor_.reset(); |
170 ui::TerminateContextFactoryForTests(); | 170 ui::TerminateContextFactoryForTests(); |
171 ImageTransportFactory::Terminate(); | 171 ImageTransportFactory::Terminate(); |
172 } | 172 } |
173 | 173 |
174 void UpdateTexture() { reflector_->OnSourcePostSubBuffer(kSubRect); } | 174 void UpdateTexture() { reflector_->OnSourcePostSubBuffer(kSubRect); } |
175 | 175 |
176 protected: | 176 protected: |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 plane_2.plane_z_order = 1; | 226 plane_2.plane_z_order = 1; |
227 list.push_back(plane_1); | 227 list.push_back(plane_1); |
228 list.push_back(plane_2); | 228 list.push_back(plane_2); |
229 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); | 229 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); |
230 EXPECT_FALSE(list[0].overlay_handled); | 230 EXPECT_FALSE(list[0].overlay_handled); |
231 } | 231 } |
232 #endif // defined(USE_OZONE) | 232 #endif // defined(USE_OZONE) |
233 | 233 |
234 } // namespace | 234 } // namespace |
235 } // namespace content | 235 } // namespace content |
OLD | NEW |