| 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 "base/files/file_util.h" | 5 #include "base/files/file_util.h" |
| 6 #include "cc/output/gl_renderer.h" | 6 #include "cc/output/gl_renderer.h" |
| 7 #include "cc/output/software_renderer.h" | 7 #include "cc/output/software_renderer.h" |
| 8 #include "cc/quads/render_pass.h" | 8 #include "cc/quads/render_pass.h" |
| 9 #include "cc/test/pixel_comparator.h" | 9 #include "cc/test/pixel_comparator.h" |
| 10 #include "cc/trees/layer_tree_settings.h" | 10 #include "cc/trees/layer_tree_settings.h" |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 void SetUp() override; | 94 void SetUp() override; |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 // Wrappers to differentiate renderers where the the output surface and viewport | 97 // Wrappers to differentiate renderers where the the output surface and viewport |
| 98 // have an externally determined size and offset. | 98 // have an externally determined size and offset. |
| 99 class GLRendererWithExpandedViewport : public GLRenderer { | 99 class GLRendererWithExpandedViewport : public GLRenderer { |
| 100 public: | 100 public: |
| 101 GLRendererWithExpandedViewport(const RendererSettings* settings, | 101 GLRendererWithExpandedViewport(const RendererSettings* settings, |
| 102 OutputSurface* output_surface, | 102 OutputSurface* output_surface, |
| 103 ResourceProvider* resource_provider, | 103 ResourceProvider* resource_provider, |
| 104 TextureMailboxDeleter* texture_mailbox_deleter, | 104 TextureMailboxDeleter* texture_mailbox_deleter) |
| 105 int highp_threshold_min) | |
| 106 : GLRenderer(settings, | 105 : GLRenderer(settings, |
| 107 output_surface, | 106 output_surface, |
| 108 resource_provider, | 107 resource_provider, |
| 109 texture_mailbox_deleter, | 108 texture_mailbox_deleter) {} |
| 110 highp_threshold_min) {} | |
| 111 }; | 109 }; |
| 112 | 110 |
| 113 class SoftwareRendererWithExpandedViewport : public SoftwareRenderer { | 111 class SoftwareRendererWithExpandedViewport : public SoftwareRenderer { |
| 114 public: | 112 public: |
| 115 SoftwareRendererWithExpandedViewport(const RendererSettings* settings, | 113 SoftwareRendererWithExpandedViewport(const RendererSettings* settings, |
| 116 OutputSurface* output_surface, | 114 OutputSurface* output_surface, |
| 117 ResourceProvider* resource_provider) | 115 ResourceProvider* resource_provider) |
| 118 : SoftwareRenderer(settings, output_surface, resource_provider) {} | 116 : SoftwareRenderer(settings, output_surface, resource_provider) {} |
| 119 }; | 117 }; |
| 120 | 118 |
| 121 class GLRendererWithFlippedSurface : public GLRenderer { | 119 class GLRendererWithFlippedSurface : public GLRenderer { |
| 122 public: | 120 public: |
| 123 GLRendererWithFlippedSurface(const RendererSettings* settings, | 121 GLRendererWithFlippedSurface(const RendererSettings* settings, |
| 124 OutputSurface* output_surface, | 122 OutputSurface* output_surface, |
| 125 ResourceProvider* resource_provider, | 123 ResourceProvider* resource_provider, |
| 126 TextureMailboxDeleter* texture_mailbox_deleter, | 124 TextureMailboxDeleter* texture_mailbox_deleter) |
| 127 int highp_threshold_min) | |
| 128 : GLRenderer(settings, | 125 : GLRenderer(settings, |
| 129 output_surface, | 126 output_surface, |
| 130 resource_provider, | 127 resource_provider, |
| 131 texture_mailbox_deleter, | 128 texture_mailbox_deleter) {} |
| 132 highp_threshold_min) {} | |
| 133 }; | 129 }; |
| 134 | 130 |
| 135 template<> | 131 template<> |
| 136 inline void RendererPixelTest<GLRenderer>::SetUp() { | 132 inline void RendererPixelTest<GLRenderer>::SetUp() { |
| 137 SetUpGLRenderer(false, false); | 133 SetUpGLRenderer(false, false); |
| 138 } | 134 } |
| 139 | 135 |
| 140 template<> | 136 template<> |
| 141 inline void RendererPixelTest<GLRendererWithExpandedViewport>::SetUp() { | 137 inline void RendererPixelTest<GLRendererWithExpandedViewport>::SetUp() { |
| 142 SetUpGLRenderer(false, false); | 138 SetUpGLRenderer(false, false); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 156 inline void RendererPixelTest<SoftwareRendererWithExpandedViewport>::SetUp() { | 152 inline void RendererPixelTest<SoftwareRendererWithExpandedViewport>::SetUp() { |
| 157 SetUpSoftwareRenderer(); | 153 SetUpSoftwareRenderer(); |
| 158 } | 154 } |
| 159 | 155 |
| 160 typedef RendererPixelTest<GLRenderer> GLRendererPixelTest; | 156 typedef RendererPixelTest<GLRenderer> GLRendererPixelTest; |
| 161 typedef RendererPixelTest<SoftwareRenderer> SoftwareRendererPixelTest; | 157 typedef RendererPixelTest<SoftwareRenderer> SoftwareRendererPixelTest; |
| 162 | 158 |
| 163 } // namespace cc | 159 } // namespace cc |
| 164 | 160 |
| 165 #endif // CC_TEST_PIXEL_TEST_H_ | 161 #endif // CC_TEST_PIXEL_TEST_H_ |
| OLD | NEW |