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 "cc/output/compositor_frame.h" | |
10 #include "cc/output/output_surface_client.h" | 9 #include "cc/output/output_surface_client.h" |
| 10 #include "cc/output/output_surface_frame.h" |
11 #include "gpu/command_buffer/client/gles2_interface.h" | 11 #include "gpu/command_buffer/client/gles2_interface.h" |
12 #include "third_party/khronos/GLES2/gl2.h" | 12 #include "third_party/khronos/GLES2/gl2.h" |
13 #include "ui/gfx/transform.h" | 13 #include "ui/gfx/transform.h" |
14 | 14 |
15 namespace cc { | 15 namespace cc { |
16 | 16 |
17 PixelTestOutputSurface::PixelTestOutputSurface( | 17 PixelTestOutputSurface::PixelTestOutputSurface( |
18 scoped_refptr<ContextProvider> context_provider, | 18 scoped_refptr<ContextProvider> context_provider, |
19 bool flipped_output_surface) | 19 bool flipped_output_surface) |
20 : OutputSurface(std::move(context_provider)), | 20 : OutputSurface(std::move(context_provider)), |
(...skipping 24 matching lines...) Expand all Loading... |
45 size.height() + surface_expansion_size_.height()); | 45 size.height() + surface_expansion_size_.height()); |
46 OutputSurface::Reshape(expanded_size, scale_factor, color_space, has_alpha); | 46 OutputSurface::Reshape(expanded_size, scale_factor, color_space, has_alpha); |
47 } | 47 } |
48 | 48 |
49 bool PixelTestOutputSurface::HasExternalStencilTest() const { | 49 bool PixelTestOutputSurface::HasExternalStencilTest() const { |
50 return external_stencil_test_; | 50 return external_stencil_test_; |
51 } | 51 } |
52 | 52 |
53 void PixelTestOutputSurface::ApplyExternalStencil() {} | 53 void PixelTestOutputSurface::ApplyExternalStencil() {} |
54 | 54 |
55 void PixelTestOutputSurface::SwapBuffers(CompositorFrame frame) { | 55 void PixelTestOutputSurface::SwapBuffers(OutputSurfaceFrame frame) { |
56 PostSwapBuffersComplete(); | 56 PostSwapBuffersComplete(); |
57 } | 57 } |
58 | 58 |
59 OverlayCandidateValidator* | 59 OverlayCandidateValidator* |
60 PixelTestOutputSurface::GetOverlayCandidateValidator() const { | 60 PixelTestOutputSurface::GetOverlayCandidateValidator() const { |
61 return nullptr; | 61 return nullptr; |
62 } | 62 } |
63 | 63 |
64 bool PixelTestOutputSurface::IsDisplayedAsOverlayPlane() const { | 64 bool PixelTestOutputSurface::IsDisplayedAsOverlayPlane() const { |
65 return false; | 65 return false; |
66 } | 66 } |
67 | 67 |
68 unsigned PixelTestOutputSurface::GetOverlayTextureId() const { | 68 unsigned PixelTestOutputSurface::GetOverlayTextureId() const { |
69 return 0; | 69 return 0; |
70 } | 70 } |
71 | 71 |
72 bool PixelTestOutputSurface::SurfaceIsSuspendForRecycle() const { | 72 bool PixelTestOutputSurface::SurfaceIsSuspendForRecycle() const { |
73 return false; | 73 return false; |
74 } | 74 } |
75 | 75 |
76 uint32_t PixelTestOutputSurface::GetFramebufferCopyTextureFormat() { | 76 uint32_t PixelTestOutputSurface::GetFramebufferCopyTextureFormat() { |
77 // This format will work if the |context_provider| has an RGB or RGBA | 77 // This format will work if the |context_provider| has an RGB or RGBA |
78 // framebuffer. For now assume tests do not want/care about alpha in | 78 // framebuffer. For now assume tests do not want/care about alpha in |
79 // the root render pass. | 79 // the root render pass. |
80 return GL_RGB; | 80 return GL_RGB; |
81 } | 81 } |
82 | 82 |
83 } // namespace cc | 83 } // namespace cc |
OLD | NEW |