| 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/test/pixel_test_output_surface.h" | 5 #include "cc/test/pixel_test_output_surface.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 : OutputSurface(std::move(context_provider)), weak_ptr_factory_(this) { | 22 : OutputSurface(std::move(context_provider)), weak_ptr_factory_(this) { |
| 23 capabilities_.flipped_output_surface = flipped_output_surface; | 23 capabilities_.flipped_output_surface = flipped_output_surface; |
| 24 } | 24 } |
| 25 | 25 |
| 26 PixelTestOutputSurface::PixelTestOutputSurface( | 26 PixelTestOutputSurface::PixelTestOutputSurface( |
| 27 std::unique_ptr<SoftwareOutputDevice> software_device) | 27 std::unique_ptr<SoftwareOutputDevice> software_device) |
| 28 : OutputSurface(std::move(software_device)), weak_ptr_factory_(this) {} | 28 : OutputSurface(std::move(software_device)), weak_ptr_factory_(this) {} |
| 29 | 29 |
| 30 PixelTestOutputSurface::~PixelTestOutputSurface() = default; | 30 PixelTestOutputSurface::~PixelTestOutputSurface() = default; |
| 31 | 31 |
| 32 void PixelTestOutputSurface::BindToClient(OutputSurfaceClient* client) { |
| 33 client_ = client; |
| 34 } |
| 35 |
| 32 void PixelTestOutputSurface::EnsureBackbuffer() {} | 36 void PixelTestOutputSurface::EnsureBackbuffer() {} |
| 33 | 37 |
| 34 void PixelTestOutputSurface::DiscardBackbuffer() {} | 38 void PixelTestOutputSurface::DiscardBackbuffer() {} |
| 35 | 39 |
| 36 void PixelTestOutputSurface::BindFramebuffer() { | 40 void PixelTestOutputSurface::BindFramebuffer() { |
| 37 context_provider()->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0); | 41 context_provider()->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0); |
| 38 } | 42 } |
| 39 | 43 |
| 40 void PixelTestOutputSurface::Reshape(const gfx::Size& size, | 44 void PixelTestOutputSurface::Reshape(const gfx::Size& size, |
| 41 float device_scale_factor, | 45 float device_scale_factor, |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 } | 87 } |
| 84 | 88 |
| 85 uint32_t PixelTestOutputSurface::GetFramebufferCopyTextureFormat() { | 89 uint32_t PixelTestOutputSurface::GetFramebufferCopyTextureFormat() { |
| 86 // This format will work if the |context_provider| has an RGB or RGBA | 90 // This format will work if the |context_provider| has an RGB or RGBA |
| 87 // framebuffer. For now assume tests do not want/care about alpha in | 91 // framebuffer. For now assume tests do not want/care about alpha in |
| 88 // the root render pass. | 92 // the root render pass. |
| 89 return GL_RGB; | 93 return GL_RGB; |
| 90 } | 94 } |
| 91 | 95 |
| 92 } // namespace cc | 96 } // namespace cc |
| OLD | NEW |