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/run_loop.h" | 5 #include "base/run_loop.h" |
6 #include "base/single_thread_task_runner.h" | 6 #include "base/single_thread_task_runner.h" |
7 #include "cc/test/fake_output_surface_client.h" | 7 #include "cc/test/fake_output_surface_client.h" |
8 #include "cc/test/test_context_provider.h" | 8 #include "cc/test/test_context_provider.h" |
9 #include "cc/test/test_web_graphics_context_3d.h" | 9 #include "cc/test/test_web_graphics_context_3d.h" |
10 #include "content/browser/compositor/browser_compositor_output_surface.h" | 10 #include "content/browser/compositor/browser_compositor_output_surface.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 new ReflectorImpl(compositor_.get(), mirroring_layer_.get())); | 151 new ReflectorImpl(compositor_.get(), mirroring_layer_.get())); |
152 reflector_->OnSourceSurfaceReady(output_surface_.get()); | 152 reflector_->OnSourceSurfaceReady(output_surface_.get()); |
153 } | 153 } |
154 | 154 |
155 void TearDown() override { | 155 void TearDown() override { |
156 if (reflector_) | 156 if (reflector_) |
157 reflector_->RemoveMirroringLayer(mirroring_layer_.get()); | 157 reflector_->RemoveMirroringLayer(mirroring_layer_.get()); |
158 cc::TextureMailbox mailbox; | 158 cc::TextureMailbox mailbox; |
159 scoped_ptr<cc::SingleReleaseCallback> release; | 159 scoped_ptr<cc::SingleReleaseCallback> release; |
160 if (mirroring_layer_->PrepareTextureMailbox(&mailbox, &release, false)) { | 160 if (mirroring_layer_->PrepareTextureMailbox(&mailbox, &release, false)) { |
161 release->Run(0, false); | 161 release->Run(gpu::SyncToken(), false); |
162 } | 162 } |
163 compositor_.reset(); | 163 compositor_.reset(); |
164 ui::TerminateContextFactoryForTests(); | 164 ui::TerminateContextFactoryForTests(); |
165 ImageTransportFactory::Terminate(); | 165 ImageTransportFactory::Terminate(); |
166 } | 166 } |
167 | 167 |
168 void UpdateTexture() { reflector_->OnSourcePostSubBuffer(kSubRect); } | 168 void UpdateTexture() { reflector_->OnSourcePostSubBuffer(kSubRect); } |
169 | 169 |
170 protected: | 170 protected: |
171 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; | 171 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 plane_2.plane_z_order = 1; | 220 plane_2.plane_z_order = 1; |
221 list.push_back(plane_1); | 221 list.push_back(plane_1); |
222 list.push_back(plane_2); | 222 list.push_back(plane_2); |
223 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); | 223 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); |
224 EXPECT_FALSE(list[0].overlay_handled); | 224 EXPECT_FALSE(list[0].overlay_handled); |
225 } | 225 } |
226 #endif // defined(USE_OZONE) | 226 #endif // defined(USE_OZONE) |
227 | 227 |
228 } // namespace | 228 } // namespace |
229 } // namespace content | 229 } // namespace content |
OLD | NEW |