OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/gl_renderer.h" | 5 #include "cc/output/gl_renderer.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 } | 123 } |
124 | 124 |
125 void TestShadersWithPrecision(TexCoordPrecision precision) { | 125 void TestShadersWithPrecision(TexCoordPrecision precision) { |
126 EXPECT_PROGRAM_VALID(renderer()->GetTextureProgram(precision)); | 126 EXPECT_PROGRAM_VALID(renderer()->GetTextureProgram(precision)); |
127 EXPECT_PROGRAM_VALID( | 127 EXPECT_PROGRAM_VALID( |
128 renderer()->GetNonPremultipliedTextureProgram(precision)); | 128 renderer()->GetNonPremultipliedTextureProgram(precision)); |
129 EXPECT_PROGRAM_VALID(renderer()->GetTextureBackgroundProgram(precision)); | 129 EXPECT_PROGRAM_VALID(renderer()->GetTextureBackgroundProgram(precision)); |
130 EXPECT_PROGRAM_VALID( | 130 EXPECT_PROGRAM_VALID( |
131 renderer()->GetNonPremultipliedTextureBackgroundProgram(precision)); | 131 renderer()->GetNonPremultipliedTextureBackgroundProgram(precision)); |
132 EXPECT_PROGRAM_VALID(renderer()->GetTextureIOSurfaceProgram(precision)); | 132 EXPECT_PROGRAM_VALID(renderer()->GetTextureIOSurfaceProgram(precision)); |
133 EXPECT_PROGRAM_VALID(renderer()->GetVideoYUVProgram(precision)); | |
134 EXPECT_PROGRAM_VALID(renderer()->GetVideoYUVAProgram(precision)); | |
135 if (renderer()->Capabilities().using_egl_image) | 133 if (renderer()->Capabilities().using_egl_image) |
136 EXPECT_PROGRAM_VALID(renderer()->GetVideoStreamTextureProgram(precision)); | 134 EXPECT_PROGRAM_VALID(renderer()->GetVideoStreamTextureProgram(precision)); |
137 else | 135 else |
138 EXPECT_FALSE(renderer()->GetVideoStreamTextureProgram(precision)); | 136 EXPECT_FALSE(renderer()->GetVideoStreamTextureProgram(precision)); |
139 } | 137 } |
140 | 138 |
141 void TestShadersWithPrecisionAndBlend(TexCoordPrecision precision, | 139 void TestShadersWithPrecisionAndBlend(TexCoordPrecision precision, |
142 BlendMode blend_mode) { | 140 BlendMode blend_mode) { |
143 EXPECT_PROGRAM_VALID( | 141 EXPECT_PROGRAM_VALID( |
144 renderer()->GetRenderPassProgram(precision, blend_mode)); | 142 renderer()->GetRenderPassProgram(precision, blend_mode)); |
(...skipping 10 matching lines...) Expand all Loading... |
155 } | 153 } |
156 | 154 |
157 EXPECT_PROGRAM_VALID(renderer()->GetTileProgram(precision, sampler)); | 155 EXPECT_PROGRAM_VALID(renderer()->GetTileProgram(precision, sampler)); |
158 EXPECT_PROGRAM_VALID(renderer()->GetTileProgramOpaque(precision, sampler)); | 156 EXPECT_PROGRAM_VALID(renderer()->GetTileProgramOpaque(precision, sampler)); |
159 EXPECT_PROGRAM_VALID(renderer()->GetTileProgramAA(precision, sampler)); | 157 EXPECT_PROGRAM_VALID(renderer()->GetTileProgramAA(precision, sampler)); |
160 EXPECT_PROGRAM_VALID(renderer()->GetTileProgramSwizzle(precision, sampler)); | 158 EXPECT_PROGRAM_VALID(renderer()->GetTileProgramSwizzle(precision, sampler)); |
161 EXPECT_PROGRAM_VALID( | 159 EXPECT_PROGRAM_VALID( |
162 renderer()->GetTileProgramSwizzleOpaque(precision, sampler)); | 160 renderer()->GetTileProgramSwizzleOpaque(precision, sampler)); |
163 EXPECT_PROGRAM_VALID( | 161 EXPECT_PROGRAM_VALID( |
164 renderer()->GetTileProgramSwizzleAA(precision, sampler)); | 162 renderer()->GetTileProgramSwizzleAA(precision, sampler)); |
| 163 EXPECT_PROGRAM_VALID(renderer()->GetVideoYUVProgram(precision, sampler)); |
| 164 EXPECT_PROGRAM_VALID(renderer()->GetVideoYUVAProgram(precision, sampler)); |
165 } | 165 } |
166 | 166 |
167 void TestShadersWithMasks(TexCoordPrecision precision, | 167 void TestShadersWithMasks(TexCoordPrecision precision, |
168 SamplerType sampler, | 168 SamplerType sampler, |
169 BlendMode blend_mode, | 169 BlendMode blend_mode, |
170 bool mask_for_background) { | 170 bool mask_for_background) { |
171 if (!renderer()->Capabilities().using_egl_image && | 171 if (!renderer()->Capabilities().using_egl_image && |
172 sampler == SAMPLER_TYPE_EXTERNAL_OES) { | 172 sampler == SAMPLER_TYPE_EXTERNAL_OES) { |
173 // This will likely be hit in tests due to usage of osmesa. | 173 // This will likely be hit in tests due to usage of osmesa. |
174 return; | 174 return; |
(...skipping 2146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2321 EXPECT_CALL(overlay_scheduler, | 2321 EXPECT_CALL(overlay_scheduler, |
2322 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, | 2322 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, |
2323 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); | 2323 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); |
2324 | 2324 |
2325 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, | 2325 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, |
2326 viewport_rect, false); | 2326 viewport_rect, false); |
2327 } | 2327 } |
2328 | 2328 |
2329 } // namespace | 2329 } // namespace |
2330 } // namespace cc | 2330 } // namespace cc |
OLD | NEW |