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/output_surface_frame.h" | 9 #include "cc/output/output_surface_frame.h" |
10 #include "cc/scheduler/begin_frame_source.h" | 10 #include "cc/scheduler/begin_frame_source.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 class TestOutputSurface : public BrowserCompositorOutputSurface { | 78 class TestOutputSurface : public BrowserCompositorOutputSurface { |
79 public: | 79 public: |
80 TestOutputSurface(scoped_refptr<cc::ContextProvider> context_provider, | 80 TestOutputSurface(scoped_refptr<cc::ContextProvider> context_provider, |
81 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, | 81 scoped_refptr<ui::CompositorVSyncManager> vsync_manager, |
82 cc::SyntheticBeginFrameSource* begin_frame_source) | 82 cc::SyntheticBeginFrameSource* begin_frame_source) |
83 : BrowserCompositorOutputSurface(std::move(context_provider), | 83 : BrowserCompositorOutputSurface(std::move(context_provider), |
84 std::move(vsync_manager), | 84 std::move(vsync_manager), |
85 begin_frame_source, | 85 begin_frame_source, |
86 CreateTestValidatorOzone()) { | 86 CreateTestValidatorOzone()) { |
87 device_scale_factor_ = 1.f; | |
88 } | 87 } |
89 | 88 |
90 void SetFlip(bool flip) { capabilities_.flipped_output_surface = flip; } | 89 void SetFlip(bool flip) { capabilities_.flipped_output_surface = flip; } |
91 | 90 |
92 void EnsureBackbuffer() override {} | 91 void EnsureBackbuffer() override {} |
93 void DiscardBackbuffer() override {} | 92 void DiscardBackbuffer() override {} |
94 void BindFramebuffer() override {} | 93 void BindFramebuffer() override {} |
| 94 void Reshape(const gfx::Size& size, |
| 95 float device_scale_factor, |
| 96 const gfx::ColorSpace& color_space, |
| 97 bool has_alpha) override {} |
95 void SwapBuffers(cc::OutputSurfaceFrame frame) override {} | 98 void SwapBuffers(cc::OutputSurfaceFrame frame) override {} |
96 uint32_t GetFramebufferCopyTextureFormat() override { return GL_RGB; } | 99 uint32_t GetFramebufferCopyTextureFormat() override { return GL_RGB; } |
97 bool IsDisplayedAsOverlayPlane() const override { return false; } | 100 bool IsDisplayedAsOverlayPlane() const override { return false; } |
98 unsigned GetOverlayTextureId() const override { return 0; } | 101 unsigned GetOverlayTextureId() const override { return 0; } |
99 bool SurfaceIsSuspendForRecycle() const override { return false; } | 102 bool SurfaceIsSuspendForRecycle() const override { return false; } |
100 | 103 |
101 void OnReflectorChanged() override { | 104 void OnReflectorChanged() override { |
102 if (!reflector_) { | 105 if (!reflector_) { |
103 reflector_texture_.reset(); | 106 reflector_texture_.reset(); |
104 } else { | 107 } else { |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 plane_2.plane_z_order = 1; | 236 plane_2.plane_z_order = 1; |
234 list.push_back(plane_1); | 237 list.push_back(plane_1); |
235 list.push_back(plane_2); | 238 list.push_back(plane_2); |
236 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); | 239 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); |
237 EXPECT_FALSE(list[0].overlay_handled); | 240 EXPECT_FALSE(list[0].overlay_handled); |
238 } | 241 } |
239 #endif // defined(USE_OZONE) | 242 #endif // defined(USE_OZONE) |
240 | 243 |
241 } // namespace | 244 } // namespace |
242 } // namespace content | 245 } // namespace content |
OLD | NEW |