| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "gpu/command_buffer/service/program_manager.h" | 5 #include "gpu/command_buffer/service/program_manager.h" |
| 6 #include "base/scoped_ptr.h" | 6 #include "base/scoped_ptr.h" |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 #include "gpu/command_buffer/service/gl_mock.h" | 9 #include "gpu/command_buffer/service/gl_mock.h" |
| 10 | 10 |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 409 ASSERT_TRUE(program_info != NULL); | 409 ASSERT_TRUE(program_info != NULL); |
| 410 program_info->Update(); | 410 program_info->Update(); |
| 411 GLint value = 0; | 411 GLint value = 0; |
| 412 program_info->GetProgramiv(GL_ACTIVE_ATTRIBUTES, &value); | 412 program_info->GetProgramiv(GL_ACTIVE_ATTRIBUTES, &value); |
| 413 EXPECT_EQ(3, value); | 413 EXPECT_EQ(3, value); |
| 414 // Check that we skipped the "gl_" uniform. | 414 // Check that we skipped the "gl_" uniform. |
| 415 program_info->GetProgramiv(GL_ACTIVE_UNIFORMS, &value); | 415 program_info->GetProgramiv(GL_ACTIVE_UNIFORMS, &value); |
| 416 EXPECT_EQ(2, value); | 416 EXPECT_EQ(2, value); |
| 417 // Check that our max length adds room for the array spec and is not as long | 417 // Check that our max length adds room for the array spec and is not as long |
| 418 // as the "gl_" uniform we skipped. | 418 // as the "gl_" uniform we skipped. |
| 419 // +4u is to account for "gl_" and NULL terminator. |
| 419 program_info->GetProgramiv(GL_ACTIVE_UNIFORM_MAX_LENGTH, &value); | 420 program_info->GetProgramiv(GL_ACTIVE_UNIFORM_MAX_LENGTH, &value); |
| 420 EXPECT_EQ(strlen(kUniform3Name) + 3u, static_cast<size_t>(value)); | 421 EXPECT_EQ(strlen(kUniform3Name) + 4u, static_cast<size_t>(value)); |
| 421 } | 422 } |
| 422 | 423 |
| 423 } // namespace gles2 | 424 } // namespace gles2 |
| 424 } // namespace gpu | 425 } // namespace gpu |
| 425 | 426 |
| 426 | 427 |
| OLD | NEW |