Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: gpu/command_buffer/service/texture_manager_unittest.cc

Issue 7518016: Revert 94743 - Allow the renderer process to map textures from one context into another. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/texture_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « gpu/command_buffer/service/texture_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698