| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 new ReflectorImpl(compositor_.get(), mirroring_layer_.get())); | 146 new ReflectorImpl(compositor_.get(), mirroring_layer_.get())); |
| 147 reflector_->OnSourceSurfaceReady(output_surface_.get()); | 147 reflector_->OnSourceSurfaceReady(output_surface_.get()); |
| 148 } | 148 } |
| 149 | 149 |
| 150 void TearDown() override { | 150 void TearDown() override { |
| 151 if (reflector_) | 151 if (reflector_) |
| 152 reflector_->RemoveMirroringLayer(mirroring_layer_.get()); | 152 reflector_->RemoveMirroringLayer(mirroring_layer_.get()); |
| 153 cc::TextureMailbox mailbox; | 153 cc::TextureMailbox mailbox; |
| 154 scoped_ptr<cc::SingleReleaseCallback> release; | 154 scoped_ptr<cc::SingleReleaseCallback> release; |
| 155 if (mirroring_layer_->PrepareTextureMailbox(&mailbox, &release, false)) { | 155 if (mirroring_layer_->PrepareTextureMailbox(&mailbox, &release, false)) { |
| 156 release->Run(0, false); | 156 release->Run(gpu::SyncToken(), false); |
| 157 } | 157 } |
| 158 compositor_.reset(); | 158 compositor_.reset(); |
| 159 ui::TerminateContextFactoryForTests(); | 159 ui::TerminateContextFactoryForTests(); |
| 160 ImageTransportFactory::Terminate(); | 160 ImageTransportFactory::Terminate(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 void UpdateTexture() { reflector_->OnSourcePostSubBuffer(kSubRect); } | 163 void UpdateTexture() { reflector_->OnSourcePostSubBuffer(kSubRect); } |
| 164 | 164 |
| 165 protected: | 165 protected: |
| 166 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; | 166 scoped_refptr<base::SingleThreadTaskRunner> compositor_task_runner_; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 plane_2.plane_z_order = 1; | 215 plane_2.plane_z_order = 1; |
| 216 list.push_back(plane_1); | 216 list.push_back(plane_1); |
| 217 list.push_back(plane_2); | 217 list.push_back(plane_2); |
| 218 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); | 218 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); |
| 219 EXPECT_FALSE(list[0].overlay_handled); | 219 EXPECT_FALSE(list[0].overlay_handled); |
| 220 } | 220 } |
| 221 #endif // defined(USE_OZONE) | 221 #endif // defined(USE_OZONE) |
| 222 | 222 |
| 223 } // namespace | 223 } // namespace |
| 224 } // namespace content | 224 } // namespace content |
| OLD | NEW |