| 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 26 matching lines...) Expand all Loading... |
| 37 } | 37 } |
| 38 | 38 |
| 39 void PixelTestOutputSurface::EnsureBackbuffer() {} | 39 void PixelTestOutputSurface::EnsureBackbuffer() {} |
| 40 | 40 |
| 41 void PixelTestOutputSurface::DiscardBackbuffer() {} | 41 void PixelTestOutputSurface::DiscardBackbuffer() {} |
| 42 | 42 |
| 43 void PixelTestOutputSurface::BindFramebuffer() { | 43 void PixelTestOutputSurface::BindFramebuffer() { |
| 44 context_provider()->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0); | 44 context_provider()->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void PixelTestOutputSurface::SetDrawRectangle(const gfx::Rect& rect) {} |
| 48 |
| 47 void PixelTestOutputSurface::Reshape(const gfx::Size& size, | 49 void PixelTestOutputSurface::Reshape(const gfx::Size& size, |
| 48 float device_scale_factor, | 50 float device_scale_factor, |
| 49 const gfx::ColorSpace& color_space, | 51 const gfx::ColorSpace& color_space, |
| 50 bool has_alpha, | 52 bool has_alpha, |
| 51 bool use_stencil) { | 53 bool use_stencil) { |
| 52 // External stencil test cannot be tested at the same time as |use_stencil|. | 54 // External stencil test cannot be tested at the same time as |use_stencil|. |
| 53 DCHECK(!use_stencil || !external_stencil_test_); | 55 DCHECK(!use_stencil || !external_stencil_test_); |
| 54 if (context_provider()) { | 56 if (context_provider()) { |
| 55 context_provider()->ContextGL()->ResizeCHROMIUM( | 57 context_provider()->ContextGL()->ResizeCHROMIUM( |
| 56 size.width(), size.height(), device_scale_factor, has_alpha); | 58 size.width(), size.height(), device_scale_factor, has_alpha); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 } | 95 } |
| 94 | 96 |
| 95 uint32_t PixelTestOutputSurface::GetFramebufferCopyTextureFormat() { | 97 uint32_t PixelTestOutputSurface::GetFramebufferCopyTextureFormat() { |
| 96 // This format will work if the |context_provider| has an RGB or RGBA | 98 // This format will work if the |context_provider| has an RGB or RGBA |
| 97 // framebuffer. For now assume tests do not want/care about alpha in | 99 // framebuffer. For now assume tests do not want/care about alpha in |
| 98 // the root render pass. | 100 // the root render pass. |
| 99 return GL_RGB; | 101 return GL_RGB; |
| 100 } | 102 } |
| 101 | 103 |
| 102 } // namespace cc | 104 } // namespace cc |
| OLD | NEW |