| 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 "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 #include "cc/test/fake_output_surface_client.h" | 8 #include "cc/test/fake_output_surface_client.h" |
| 9 #include "cc/test/test_context_provider.h" | 9 #include "cc/test/test_context_provider.h" |
| 10 #include "cc/test/test_web_graphics_context_3d.h" | 10 #include "cc/test/test_web_graphics_context_3d.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 (*surfaces)[0].overlay_handled = true; | 55 (*surfaces)[0].overlay_handled = true; |
| 56 } | 56 } |
| 57 }; | 57 }; |
| 58 #endif // defined(USE_OZONE) | 58 #endif // defined(USE_OZONE) |
| 59 | 59 |
| 60 std::unique_ptr<BrowserCompositorOverlayCandidateValidator> | 60 std::unique_ptr<BrowserCompositorOverlayCandidateValidator> |
| 61 CreateTestValidatorOzone() { | 61 CreateTestValidatorOzone() { |
| 62 #if defined(USE_OZONE) | 62 #if defined(USE_OZONE) |
| 63 return std::unique_ptr<BrowserCompositorOverlayCandidateValidator>( | 63 return std::unique_ptr<BrowserCompositorOverlayCandidateValidator>( |
| 64 new BrowserCompositorOverlayCandidateValidatorOzone( | 64 new BrowserCompositorOverlayCandidateValidatorOzone( |
| 65 0, std::unique_ptr<ui::OverlayCandidatesOzone>( | 65 std::unique_ptr<ui::OverlayCandidatesOzone>( |
| 66 new TestOverlayCandidatesOzone()))); | 66 new TestOverlayCandidatesOzone()))); |
| 67 #else | 67 #else |
| 68 return nullptr; | 68 return nullptr; |
| 69 #endif // defined(USE_OZONE) | 69 #endif // defined(USE_OZONE) |
| 70 } | 70 } |
| 71 | 71 |
| 72 class TestOutputSurface : public BrowserCompositorOutputSurface { | 72 class TestOutputSurface : public BrowserCompositorOutputSurface { |
| 73 public: | 73 public: |
| 74 TestOutputSurface( | 74 TestOutputSurface( |
| 75 const scoped_refptr<cc::ContextProvider>& context_provider, | 75 const scoped_refptr<cc::ContextProvider>& context_provider, |
| 76 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, | 76 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager, |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 plane_2.plane_z_order = 1; | 222 plane_2.plane_z_order = 1; |
| 223 list.push_back(plane_1); | 223 list.push_back(plane_1); |
| 224 list.push_back(plane_2); | 224 list.push_back(plane_2); |
| 225 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); | 225 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); |
| 226 EXPECT_FALSE(list[0].overlay_handled); | 226 EXPECT_FALSE(list[0].overlay_handled); |
| 227 } | 227 } |
| 228 #endif // defined(USE_OZONE) | 228 #endif // defined(USE_OZONE) |
| 229 | 229 |
| 230 } // namespace | 230 } // namespace |
| 231 } // namespace content | 231 } // namespace content |
| OLD | NEW |