| Index: gpu/command_buffer/service/texture_manager_unittest.cc
|
| ===================================================================
|
| --- gpu/command_buffer/service/texture_manager_unittest.cc (revision 94807)
|
| +++ gpu/command_buffer/service/texture_manager_unittest.cc (working copy)
|
| @@ -153,6 +153,28 @@
|
| ASSERT_TRUE(info1 == NULL);
|
| }
|
|
|
| +TEST_F(TextureManagerTest, DestroyUnowned) {
|
| + const GLuint kClient1Id = 1;
|
| + const GLuint kService1Id = 11;
|
| + EXPECT_FALSE(manager_.HaveUnrenderableTextures());
|
| + // Check we can create texture.
|
| + TextureManager::TextureInfo* created_info =
|
| + manager_.CreateTextureInfo(&feature_info_, kClient1Id, kService1Id);
|
| + created_info->SetNotOwned();
|
| +
|
| + // Check texture got created.
|
| + TextureManager::TextureInfo* info1 = manager_.GetTextureInfo(kClient1Id);
|
| + ASSERT_TRUE(info1 != NULL);
|
| + EXPECT_CALL(*gl_, DeleteTextures(4, _))
|
| + .Times(1)
|
| + .RetiresOnSaturation();
|
| +
|
| + // Check that it is not freed if it is not owned.
|
| + manager_.Destroy(true);
|
| + info1 = manager_.GetTextureInfo(kClient1Id);
|
| + ASSERT_TRUE(info1 == NULL);
|
| +}
|
| +
|
| TEST_F(TextureManagerTest, MaxValues) {
|
| // Check we get the right values for the max sizes.
|
| EXPECT_EQ(kMax2dLevels, manager_.MaxLevelsForTarget(GL_TEXTURE_2D));
|
|
|
| Property changes on: gpu/command_buffer/service/texture_manager_unittest.cc
|
| ___________________________________________________________________
|
| Added: svn:mergeinfo
|
| Merged /branches/chrome_webkit_merge_branch/o3d/gpu/command_buffer/service/texture_manager_unittest.cc:r69-2775
|
| Merged /trunk/src/o3d/gpu/command_buffer/service/texture_manager_unittest.cc:r32866-32958
|
|
|
|
|