OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "cc/output/output_surface.h" | 5 #include "cc/output/output_surface.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "cc/output/output_surface_frame.h" | 10 #include "cc/output/output_surface_frame.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 scoped_refptr<TestContextProvider> context_provider) | 24 scoped_refptr<TestContextProvider> context_provider) |
25 : OutputSurface(std::move(context_provider)) {} | 25 : OutputSurface(std::move(context_provider)) {} |
26 | 26 |
27 explicit TestOutputSurface( | 27 explicit TestOutputSurface( |
28 std::unique_ptr<SoftwareOutputDevice> software_device) | 28 std::unique_ptr<SoftwareOutputDevice> software_device) |
29 : OutputSurface(std::move(software_device)) {} | 29 : OutputSurface(std::move(software_device)) {} |
30 | 30 |
31 void EnsureBackbuffer() override {} | 31 void EnsureBackbuffer() override {} |
32 void DiscardBackbuffer() override {} | 32 void DiscardBackbuffer() override {} |
33 void BindFramebuffer() override {} | 33 void BindFramebuffer() override {} |
| 34 void Reshape(const gfx::Size& size, |
| 35 float device_scale_factor, |
| 36 const gfx::ColorSpace& color_space, |
| 37 bool has_alpha) override {} |
34 void SwapBuffers(OutputSurfaceFrame frame) override { | 38 void SwapBuffers(OutputSurfaceFrame frame) override { |
35 client_->DidSwapBuffersComplete(); | 39 client_->DidSwapBuffersComplete(); |
36 } | 40 } |
37 uint32_t GetFramebufferCopyTextureFormat() override { | 41 uint32_t GetFramebufferCopyTextureFormat() override { |
38 // TestContextProvider has no real framebuffer, just use RGB. | 42 // TestContextProvider has no real framebuffer, just use RGB. |
39 return GL_RGB; | 43 return GL_RGB; |
40 } | 44 } |
41 OverlayCandidateValidator* GetOverlayCandidateValidator() const override { | 45 OverlayCandidateValidator* GetOverlayCandidateValidator() const override { |
42 return nullptr; | 46 return nullptr; |
43 } | 47 } |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 context_provider->UnboundTestContext3d()->set_context_lost(true); | 113 context_provider->UnboundTestContext3d()->set_context_lost(true); |
110 | 114 |
111 TestOutputSurface output_surface(context_provider); | 115 TestOutputSurface output_surface(context_provider); |
112 | 116 |
113 FakeOutputSurfaceClient client; | 117 FakeOutputSurfaceClient client; |
114 EXPECT_FALSE(output_surface.BindToClient(&client)); | 118 EXPECT_FALSE(output_surface.BindToClient(&client)); |
115 } | 119 } |
116 | 120 |
117 } // namespace | 121 } // namespace |
118 } // namespace cc | 122 } // namespace cc |
OLD | NEW |