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

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

Issue 22824009: Remove StreamTextureManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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
Index: gpu/command_buffer/service/texture_manager_unittest.cc
diff --git a/gpu/command_buffer/service/texture_manager_unittest.cc b/gpu/command_buffer/service/texture_manager_unittest.cc
index 402cc8d0eff7b1394e8794b36d9b483eef7393aa..ccd7b026b259941a24b2ca7aa6df3920a5858637 100644
--- a/gpu/command_buffer/service/texture_manager_unittest.cc
+++ b/gpu/command_buffer/service/texture_manager_unittest.cc
@@ -469,8 +469,23 @@ TEST_F(TextureTest, SetTargetTextureExternalOES) {
EXPECT_FALSE(manager_->CanRender(texture_ref_.get()));
EXPECT_TRUE(texture->SafeToRenderFrom());
EXPECT_TRUE(texture->IsImmutable());
- manager_->SetStreamTexture(texture_ref_.get(), true);
+ manager_->SetLevelInfo(texture_ref_.get(),
+ GL_TEXTURE_EXTERNAL_OES,
+ 0,
+ GL_RGBA,
+ 0,
+ 0,
+ 1,
+ 0,
+ GL_RGBA,
+ GL_UNSIGNED_BYTE,
+ true);
+ manager_->SetLevelImage(texture_ref_.get(),
+ GL_TEXTURE_EXTERNAL_OES,
+ 0,
+ gfx::GLImage::CreateGLImage(0).get());
EXPECT_TRUE(manager_->CanRender(texture_ref_.get()));
+ EXPECT_TRUE(texture->IsImmutable());
}
TEST_F(TextureTest, ZeroSizeCanNotRender) {
@@ -2002,25 +2017,6 @@ TEST_F(ProduceConsumeTextureTest, ProduceConsumeClearRectangle) {
decoder_.get(), restored_texture.get(), GL_TEXTURE_RECTANGLE_ARB, 0));
}
-TEST_F(ProduceConsumeTextureTest, ProduceConsumeStreamTexture) {
- manager_->SetTarget(texture_ref_.get(), GL_TEXTURE_EXTERNAL_OES);
- Texture* texture = texture_ref_->texture();
- EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_EXTERNAL_OES), texture->target());
- manager_->SetStreamTexture(texture_ref_.get(), true);
- GLuint service_id = texture->service_id();
- Texture* produced_texture = Produce(texture_ref_.get());
- EXPECT_TRUE(texture->IsStreamTexture());
-
- GLuint client_id = texture2_->client_id();
- manager_->RemoveTexture(client_id);
- Consume(client_id, produced_texture);
- scoped_refptr<TextureRef> restored_texture = manager_->GetTexture(client_id);
- EXPECT_EQ(produced_texture, restored_texture->texture());
- EXPECT_TRUE(restored_texture->texture()->IsStreamTexture());
- EXPECT_TRUE(restored_texture->texture()->IsImmutable());
- EXPECT_EQ(service_id, restored_texture->service_id());
-}
piman 2013/08/12 23:22:07 We should keep a test that we can Produce/Consume
no sievers 2013/08/13 00:21:35 Done.
-
TEST_F(ProduceConsumeTextureTest, ProduceConsumeCube) {
manager_->SetTarget(texture_ref_.get(), GL_TEXTURE_CUBE_MAP);
Texture* texture = texture_ref_->texture();

Powered by Google App Engine
This is Rietveld 408576698