Chromium Code Reviews| Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc |
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc |
| index eadfbcd663781b0946dc556ae09a8d9c8aea0031..3e7d91f85743cff2e108c8d0e7b2aa316141258c 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc |
| @@ -4347,6 +4347,51 @@ TEST_F(GLES2DecoderWithShaderTest, GetProgramInfoCHROMIUMInvalidArgs) { |
| EXPECT_EQ(0u, info->num_uniforms); |
| } |
| +TEST_F(GLES2DecoderManualInitTest, EGLImageExternalBindTexture) { |
| + InitDecoder( |
| + "GL_OES_EGL_image_external", // extensions |
| + false, // has alpha |
| + false, // has depth |
| + false, // has stencil |
| + false, // request alpha |
| + false, // request depth |
| + false); // request stencil |
| + EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_EXTERNAL_OES, kNewServiceId)); |
| + EXPECT_CALL(*gl_, GenTextures(1, _)) |
| + .WillOnce(SetArgumentPointee<1>(kNewServiceId)); |
| + BindTexture bind; |
| + bind.Init(GL_TEXTURE_EXTERNAL_OES, kNewClientId); |
| + EXPECT_EQ(error::kNoError, ExecuteCmd(bind)); |
| + EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| + TextureManager::TextureInfo* info = GetTextureInfo(kNewClientId); |
| + EXPECT_TRUE(info != NULL); |
| + EXPECT_TRUE(info->target() == GL_TEXTURE_EXTERNAL_OES); |
| +} |
| + |
| +TEST_F(GLES2DecoderManualInitTest, EGLImageExternalTextureDefaults) { |
| + InitDecoder( |
| + "GL_OES_EGL_image_external", // extensions |
| + false, // has alpha |
| + false, // has depth |
| + false, // has stencil |
| + false, // request alpha |
| + false, // request depth |
| + false); // request stencil |
| + EXPECT_CALL(*gl_, BindTexture(GL_TEXTURE_EXTERNAL_OES, kNewServiceId)); |
| + EXPECT_CALL(*gl_, GenTextures(1, _)) |
| + .WillOnce(SetArgumentPointee<1>(kNewServiceId)); |
| + BindTexture bind; |
| + bind.Init(GL_TEXTURE_EXTERNAL_OES, kNewClientId); |
| + EXPECT_EQ(error::kNoError, ExecuteCmd(bind)); |
| + EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| + TextureManager::TextureInfo* info = GetTextureInfo(kNewClientId); |
| + EXPECT_TRUE(info != NULL); |
| + EXPECT_TRUE(info->target() == GL_TEXTURE_EXTERNAL_OES); |
| + EXPECT_TRUE(info->min_filter() == GL_LINEAR); |
| + EXPECT_TRUE(info->wrap_s() == GL_CLAMP_TO_EDGE); |
| + EXPECT_TRUE(info->wrap_t() == GL_CLAMP_TO_EDGE); |
|
no sievers
2011/07/20 00:58:16
Darn, although it's easy to setup the 'default tex
greggman
2011/07/20 01:41:18
Yea, it seems like you need to set the defaults in
no sievers
2011/07/20 23:00:37
That was the place I was looking for. Also elimina
|
| +} |
| + |
| // TODO(gman): Complete this test. |
| // TEST_F(GLES2DecoderTest, CompressedTexImage2DGLError) { |
| // } |