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 "cc/output/compositor_frame_metadata.h" | 7 #include "cc/output/compositor_frame_metadata.h" |
8 #include "cc/resources/prioritized_resource_manager.h" | 8 #include "cc/resources/prioritized_resource_manager.h" |
9 #include "cc/resources/resource_provider.h" | 9 #include "cc/resources/resource_provider.h" |
10 #include "cc/resources/sync_point_helper.h" | 10 #include "cc/resources/sync_point_helper.h" |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 } // namespace | 270 } // namespace |
271 | 271 |
272 class GLRendererShaderTest : public testing::Test { | 272 class GLRendererShaderTest : public testing::Test { |
273 protected: | 273 protected: |
274 GLRendererShaderTest() | 274 GLRendererShaderTest() |
275 : output_surface_(FakeOutputSurface::Create3d()), | 275 : output_surface_(FakeOutputSurface::Create3d()), |
276 resource_provider_(ResourceProvider::Create(output_surface_.get(), 0)), | 276 resource_provider_(ResourceProvider::Create(output_surface_.get(), 0)), |
277 renderer_(GLRenderer::Create(&mock_client_, | 277 renderer_(GLRenderer::Create(&mock_client_, |
278 output_surface_.get(), | 278 output_surface_.get(), |
279 resource_provider_.get(), | 279 resource_provider_.get(), |
280 0)) {} | 280 0, |
| 281 false)) {} |
281 | 282 |
282 void TestRenderPassProgram() { | 283 void TestRenderPassProgram() { |
283 EXPECT_PROGRAM_VALID(renderer_->render_pass_program_); | 284 EXPECT_PROGRAM_VALID(renderer_->render_pass_program_); |
284 EXPECT_TRUE(renderer_->program_shadow_ == | 285 EXPECT_TRUE(renderer_->program_shadow_ == |
285 renderer_->render_pass_program_->program()); | 286 renderer_->render_pass_program_->program()); |
286 } | 287 } |
287 | 288 |
288 void TestRenderPassColorMatrixProgram() { | 289 void TestRenderPassColorMatrixProgram() { |
289 EXPECT_PROGRAM_VALID(renderer_->render_pass_color_matrix_program_); | 290 EXPECT_PROGRAM_VALID(renderer_->render_pass_color_matrix_program_); |
290 EXPECT_TRUE(renderer_->program_shadow_ == | 291 EXPECT_TRUE(renderer_->program_shadow_ == |
(...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1493 base::MessageLoop::current()->Run(); | 1494 base::MessageLoop::current()->Run(); |
1494 | 1495 |
1495 // The sync point should have happened. | 1496 // The sync point should have happened. |
1496 EXPECT_EQ(1, sync_point_callback_count); | 1497 EXPECT_EQ(1, sync_point_callback_count); |
1497 EXPECT_EQ(1, other_callback_count); | 1498 EXPECT_EQ(1, other_callback_count); |
1498 } | 1499 } |
1499 #endif // OS_ANDROID | 1500 #endif // OS_ANDROID |
1500 | 1501 |
1501 } // namespace | 1502 } // namespace |
1502 } // namespace cc | 1503 } // namespace cc |
OLD | NEW |