Chromium Code Reviews| Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc |
| diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc |
| index 35a8197003c623dd8f30e70c19e45924bd304a9b..c437780e1e01bf1e91601ff45620b4277d0977b2 100644 |
| --- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc |
| +++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest_context_state.cc |
| @@ -450,6 +450,36 @@ TEST_P(GLES3DecoderTest, ES3PixelStoreiWithPixelUnpackBuffer) { |
| DoBindBuffer(GL_PIXEL_UNPACK_BUFFER, client_buffer_id_, kServiceBufferId); |
| } |
| +TEST_P(GLES2DecoderManualInitTest, MipmapHintOnCoreProfile) { |
| + // On a core profile, glHint(GL_GENERATE_MIPMAP_HINT) should be a noop |
| + InitState init; |
| + init.gl_version = "3.2"; |
| + InitDecoder(init); |
| + |
| + cmds::Hint cmd; |
| + cmd.Init(GL_GENERATE_MIPMAP_HINT, GL_NICEST); |
| + |
| + EXPECT_CALL(*gl_, Hint(GL_GENERATE_MIPMAP_HINT, GL_NICEST)).Times(0); |
| + EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
|
Zhenyao Mo
2016/05/25 21:42:38
You should check no GL error here.
|
| +} |
| + |
| +TEST_P(GLES2DecoderManualInitTest, MipmapHintOnCompatibilityProfile) { |
| + // On a compatibility profile, glHint(GL_GENERATE_MIPMAP_HINT) should be go |
| + // through |
| + InitState init; |
| + init.gl_version = "3.2"; |
| + init.extensions += " GL_ARB_compatibility"; |
| + InitDecoder(init); |
| + |
| + cmds::Hint cmd; |
| + cmd.Init(GL_GENERATE_MIPMAP_HINT, GL_NICEST); |
| + |
| + EXPECT_CALL(*gl_, Hint(GL_GENERATE_MIPMAP_HINT, GL_NICEST)) |
| + .Times(1) |
| + .RetiresOnSaturation(); |
| + EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| +} |
| + |
| // TODO(vmiura): Tests for VAO restore. |
| // TODO(vmiura): Tests for ContextState::RestoreAttribute(). |