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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 return nullptr; | 67 return nullptr; |
68 #endif // defined(USE_OZONE) | 68 #endif // defined(USE_OZONE) |
69 } | 69 } |
70 | 70 |
71 class TestOutputSurface : public BrowserCompositorOutputSurface { | 71 class TestOutputSurface : public BrowserCompositorOutputSurface { |
72 public: | 72 public: |
73 TestOutputSurface( | 73 TestOutputSurface( |
74 const scoped_refptr<cc::ContextProvider>& context_provider, | 74 const scoped_refptr<cc::ContextProvider>& context_provider, |
75 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager) | 75 const scoped_refptr<ui::CompositorVSyncManager>& vsync_manager) |
76 : BrowserCompositorOutputSurface(context_provider, | 76 : BrowserCompositorOutputSurface(context_provider, |
| 77 nullptr, |
77 vsync_manager, | 78 vsync_manager, |
78 CreateTestValidatorOzone().Pass()) {} | 79 CreateTestValidatorOzone().Pass()) {} |
79 | 80 |
80 void SetFlip(bool flip) { capabilities_.flipped_output_surface = flip; } | 81 void SetFlip(bool flip) { capabilities_.flipped_output_surface = flip; } |
81 | 82 |
82 void SwapBuffers(cc::CompositorFrame* frame) override {} | 83 void SwapBuffers(cc::CompositorFrame* frame) override {} |
83 | 84 |
84 void OnReflectorChanged() override { | 85 void OnReflectorChanged() override { |
85 if (!reflector_) { | 86 if (!reflector_) { |
86 reflector_texture_.reset(); | 87 reflector_texture_.reset(); |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 plane_2.plane_z_order = 1; | 214 plane_2.plane_z_order = 1; |
214 list.push_back(plane_1); | 215 list.push_back(plane_1); |
215 list.push_back(plane_2); | 216 list.push_back(plane_2); |
216 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); | 217 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); |
217 EXPECT_FALSE(list[0].overlay_handled); | 218 EXPECT_FALSE(list[0].overlay_handled); |
218 } | 219 } |
219 #endif // defined(USE_OZONE) | 220 #endif // defined(USE_OZONE) |
220 | 221 |
221 } // namespace | 222 } // namespace |
222 } // namespace content | 223 } // namespace content |
OLD | NEW |