| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // Tests for GLES2Implementation. | 5 // Tests for GLES2Implementation. |
| 6 | 6 |
| 7 #include "gpu/command_buffer/client/gles2_implementation.h" | 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 static const GLint kMaxVertexTextureImageUnits = 0; | 377 static const GLint kMaxVertexTextureImageUnits = 0; |
| 378 static const GLint kMaxVertexUniformVectors = 128; | 378 static const GLint kMaxVertexUniformVectors = 128; |
| 379 static const GLint kNumCompressedTextureFormats = 0; | 379 static const GLint kNumCompressedTextureFormats = 0; |
| 380 static const GLint kNumShaderBinaryFormats = 0; | 380 static const GLint kNumShaderBinaryFormats = 0; |
| 381 static const GLuint kStartId = 1024; | 381 static const GLuint kStartId = 1024; |
| 382 static const GLuint kBuffersStartId = | 382 static const GLuint kBuffersStartId = |
| 383 GLES2Implementation::kClientSideArrayId + 2 * kNumTestContexts; | 383 GLES2Implementation::kClientSideArrayId + 2 * kNumTestContexts; |
| 384 static const GLuint kFramebuffersStartId = 1; | 384 static const GLuint kFramebuffersStartId = 1; |
| 385 static const GLuint kProgramsAndShadersStartId = 1; | 385 static const GLuint kProgramsAndShadersStartId = 1; |
| 386 static const GLuint kRenderbuffersStartId = 1; | 386 static const GLuint kRenderbuffersStartId = 1; |
| 387 static const GLuint kSamplersStartId = 1; |
| 387 static const GLuint kTexturesStartId = 1; | 388 static const GLuint kTexturesStartId = 1; |
| 388 static const GLuint kQueriesStartId = 1; | 389 static const GLuint kQueriesStartId = 1; |
| 389 static const GLuint kVertexArraysStartId = 1; | 390 static const GLuint kVertexArraysStartId = 1; |
| 390 static const GLuint kValuebuffersStartId = 1; | 391 static const GLuint kValuebuffersStartId = 1; |
| 391 | 392 |
| 392 typedef MockTransferBuffer::ExpectedMemoryInfo ExpectedMemoryInfo; | 393 typedef MockTransferBuffer::ExpectedMemoryInfo ExpectedMemoryInfo; |
| 393 | 394 |
| 394 class TestContext { | 395 class TestContext { |
| 395 public: | 396 public: |
| 396 TestContext() : commands_(NULL), token_(0) {} | 397 TestContext() : commands_(NULL), token_(0) {} |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 const GLint GLES2ImplementationTest::kMaxVertexAttribs; | 748 const GLint GLES2ImplementationTest::kMaxVertexAttribs; |
| 748 const GLint GLES2ImplementationTest::kMaxVertexTextureImageUnits; | 749 const GLint GLES2ImplementationTest::kMaxVertexTextureImageUnits; |
| 749 const GLint GLES2ImplementationTest::kMaxVertexUniformVectors; | 750 const GLint GLES2ImplementationTest::kMaxVertexUniformVectors; |
| 750 const GLint GLES2ImplementationTest::kNumCompressedTextureFormats; | 751 const GLint GLES2ImplementationTest::kNumCompressedTextureFormats; |
| 751 const GLint GLES2ImplementationTest::kNumShaderBinaryFormats; | 752 const GLint GLES2ImplementationTest::kNumShaderBinaryFormats; |
| 752 const GLuint GLES2ImplementationTest::kStartId; | 753 const GLuint GLES2ImplementationTest::kStartId; |
| 753 const GLuint GLES2ImplementationTest::kBuffersStartId; | 754 const GLuint GLES2ImplementationTest::kBuffersStartId; |
| 754 const GLuint GLES2ImplementationTest::kFramebuffersStartId; | 755 const GLuint GLES2ImplementationTest::kFramebuffersStartId; |
| 755 const GLuint GLES2ImplementationTest::kProgramsAndShadersStartId; | 756 const GLuint GLES2ImplementationTest::kProgramsAndShadersStartId; |
| 756 const GLuint GLES2ImplementationTest::kRenderbuffersStartId; | 757 const GLuint GLES2ImplementationTest::kRenderbuffersStartId; |
| 758 const GLuint GLES2ImplementationTest::kSamplersStartId; |
| 757 const GLuint GLES2ImplementationTest::kTexturesStartId; | 759 const GLuint GLES2ImplementationTest::kTexturesStartId; |
| 758 const GLuint GLES2ImplementationTest::kQueriesStartId; | 760 const GLuint GLES2ImplementationTest::kQueriesStartId; |
| 759 const GLuint GLES2ImplementationTest::kVertexArraysStartId; | 761 const GLuint GLES2ImplementationTest::kVertexArraysStartId; |
| 760 const GLuint GLES2ImplementationTest::kValuebuffersStartId; | 762 const GLuint GLES2ImplementationTest::kValuebuffersStartId; |
| 761 #endif | 763 #endif |
| 762 | 764 |
| 763 TEST_F(GLES2ImplementationTest, Basic) { | 765 TEST_F(GLES2ImplementationTest, Basic) { |
| 764 EXPECT_TRUE(gl_->share_group() != NULL); | 766 EXPECT_TRUE(gl_->share_group() != NULL); |
| 765 } | 767 } |
| 766 | 768 |
| (...skipping 2547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3314 TEST_F(GLES2ImplementationManualInitTest, FailInitOnTransferBufferFail) { | 3316 TEST_F(GLES2ImplementationManualInitTest, FailInitOnTransferBufferFail) { |
| 3315 ContextInitOptions init_options; | 3317 ContextInitOptions init_options; |
| 3316 init_options.transfer_buffer_initialize_fail = true; | 3318 init_options.transfer_buffer_initialize_fail = true; |
| 3317 EXPECT_FALSE(Initialize(init_options)); | 3319 EXPECT_FALSE(Initialize(init_options)); |
| 3318 } | 3320 } |
| 3319 | 3321 |
| 3320 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" | 3322 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" |
| 3321 | 3323 |
| 3322 } // namespace gles2 | 3324 } // namespace gles2 |
| 3323 } // namespace gpu | 3325 } // namespace gpu |
| OLD | NEW |