| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 } | 125 } |
| 126 | 126 |
| 127 void TestBasicShaders() { | 127 void TestBasicShaders() { |
| 128 EXPECT_PROGRAM_VALID(renderer()->GetDebugBorderProgram()); | 128 EXPECT_PROGRAM_VALID(renderer()->GetDebugBorderProgram()); |
| 129 EXPECT_PROGRAM_VALID(renderer()->GetSolidColorProgram()); | 129 EXPECT_PROGRAM_VALID(renderer()->GetSolidColorProgram()); |
| 130 EXPECT_PROGRAM_VALID(renderer()->GetSolidColorProgramAA()); | 130 EXPECT_PROGRAM_VALID(renderer()->GetSolidColorProgramAA()); |
| 131 } | 131 } |
| 132 | 132 |
| 133 void TestShadersWithPrecision(TexCoordPrecision precision) { | 133 void TestShadersWithPrecision(TexCoordPrecision precision) { |
| 134 EXPECT_PROGRAM_VALID(renderer()->GetTextureIOSurfaceProgram(precision)); | 134 EXPECT_PROGRAM_VALID(renderer()->GetTextureIOSurfaceProgram(precision)); |
| 135 // This program uses external textures and sampler, so it won't compile |
| 136 // everywhere. |
| 135 if (renderer()->Capabilities().using_egl_image) | 137 if (renderer()->Capabilities().using_egl_image) |
| 136 EXPECT_PROGRAM_VALID(renderer()->GetVideoStreamTextureProgram(precision)); | 138 EXPECT_PROGRAM_VALID(renderer()->GetVideoStreamTextureProgram(precision)); |
| 137 else | |
| 138 EXPECT_FALSE(renderer()->GetVideoStreamTextureProgram(precision)); | |
| 139 } | 139 } |
| 140 | 140 |
| 141 void TestShadersWithPrecisionAndBlend(TexCoordPrecision precision, | 141 void TestShadersWithPrecisionAndBlend(TexCoordPrecision precision, |
| 142 BlendMode blend_mode) { | 142 BlendMode blend_mode) { |
| 143 EXPECT_PROGRAM_VALID( | 143 EXPECT_PROGRAM_VALID( |
| 144 renderer()->GetRenderPassProgram(precision, blend_mode)); | 144 renderer()->GetRenderPassProgram(precision, blend_mode)); |
| 145 EXPECT_PROGRAM_VALID( | 145 EXPECT_PROGRAM_VALID( |
| 146 renderer()->GetRenderPassProgramAA(precision, blend_mode)); | 146 renderer()->GetRenderPassProgramAA(precision, blend_mode)); |
| 147 } | 147 } |
| 148 | 148 |
| (...skipping 2053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2202 EXPECT_CALL(overlay_scheduler, | 2202 EXPECT_CALL(overlay_scheduler, |
| 2203 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, | 2203 Schedule(1, gfx::OVERLAY_TRANSFORM_NONE, _, viewport_rect, |
| 2204 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); | 2204 BoundingRect(uv_top_left, uv_bottom_right))).Times(1); |
| 2205 | 2205 |
| 2206 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, | 2206 renderer.DrawFrame(&render_passes_in_draw_order_, 1.f, viewport_rect, |
| 2207 viewport_rect, false); | 2207 viewport_rect, false); |
| 2208 } | 2208 } |
| 2209 | 2209 |
| 2210 } // namespace | 2210 } // namespace |
| 2211 } // namespace cc | 2211 } // namespace cc |
| OLD | NEW |