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 #include "gpu/command_buffer/service/texture_manager.h" | 5 #include "gpu/command_buffer/service/texture_manager.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "gpu/command_buffer/service/error_state_mock.h" | 10 #include "gpu/command_buffer/service/error_state_mock.h" |
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1055 GL_TEXTURE_2D, | 1055 GL_TEXTURE_2D, |
1056 1, | 1056 1, |
1057 GL_RGBA, | 1057 GL_RGBA, |
1058 4, | 1058 4, |
1059 5, | 1059 5, |
1060 1, | 1060 1, |
1061 0, | 1061 0, |
1062 GL_RGBA, | 1062 GL_RGBA, |
1063 GL_UNSIGNED_BYTE, | 1063 GL_UNSIGNED_BYTE, |
1064 true); | 1064 true); |
1065 GLenum type = -1; | 1065 GLenum type = 0; |
1066 GLenum format = -1; | 1066 GLenum format = 0; |
1067 Texture* texture = texture_ref_->texture(); | 1067 Texture* texture = texture_ref_->texture(); |
1068 EXPECT_FALSE(texture->GetLevelType(GL_TEXTURE_2D, -1, &type, &format)); | 1068 EXPECT_FALSE(texture->GetLevelType(GL_TEXTURE_2D, -1, &type, &format)); |
1069 EXPECT_FALSE(texture->GetLevelType(GL_TEXTURE_2D, 1000, &type, &format)); | 1069 EXPECT_FALSE(texture->GetLevelType(GL_TEXTURE_2D, 1000, &type, &format)); |
1070 EXPECT_FALSE(texture->GetLevelType(GL_TEXTURE_2D, 0, &type, &format)); | 1070 EXPECT_FALSE(texture->GetLevelType(GL_TEXTURE_2D, 0, &type, &format)); |
1071 EXPECT_TRUE(texture->GetLevelType(GL_TEXTURE_2D, 1, &type, &format)); | 1071 EXPECT_TRUE(texture->GetLevelType(GL_TEXTURE_2D, 1, &type, &format)); |
1072 EXPECT_EQ(static_cast<GLenum>(GL_UNSIGNED_BYTE), type); | 1072 EXPECT_EQ(static_cast<GLenum>(GL_UNSIGNED_BYTE), type); |
1073 EXPECT_EQ(static_cast<GLenum>(GL_RGBA), format); | 1073 EXPECT_EQ(static_cast<GLenum>(GL_RGBA), format); |
1074 manager_->RemoveTexture(kClient1Id); | 1074 manager_->RemoveTexture(kClient1Id); |
1075 EXPECT_TRUE(texture->GetLevelType(GL_TEXTURE_2D, 1, &type, &format)); | 1075 EXPECT_TRUE(texture->GetLevelType(GL_TEXTURE_2D, 1, &type, &format)); |
1076 EXPECT_EQ(static_cast<GLenum>(GL_UNSIGNED_BYTE), type); | 1076 EXPECT_EQ(static_cast<GLenum>(GL_UNSIGNED_BYTE), type); |
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2508 | 2508 |
2509 EXPECT_CALL(*gl_, DeleteTextures(1, _)) | 2509 EXPECT_CALL(*gl_, DeleteTextures(1, _)) |
2510 .Times(1) | 2510 .Times(1) |
2511 .RetiresOnSaturation(); | 2511 .RetiresOnSaturation(); |
2512 texture_manager1_->RemoveTexture(10); | 2512 texture_manager1_->RemoveTexture(10); |
2513 texture_manager2_->RemoveTexture(20); | 2513 texture_manager2_->RemoveTexture(20); |
2514 } | 2514 } |
2515 | 2515 |
2516 } // namespace gles2 | 2516 } // namespace gles2 |
2517 } // namespace gpu | 2517 } // namespace gpu |
OLD | NEW |