| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 6 | 6 |
| 7 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 7 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
| 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 9 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" | 9 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" |
| 10 #include "gpu/command_buffer/service/cmd_buffer_engine.h" | 10 #include "gpu/command_buffer/service/cmd_buffer_engine.h" |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 attach_cmd.Init(client_program_id_, kClientVertexShaderId); | 245 attach_cmd.Init(client_program_id_, kClientVertexShaderId); |
| 246 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd)); | 246 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd)); |
| 247 | 247 |
| 248 attach_cmd.Init(client_program_id_, kClientFragmentShaderId); | 248 attach_cmd.Init(client_program_id_, kClientFragmentShaderId); |
| 249 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd)); | 249 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd)); |
| 250 | 250 |
| 251 program->Link(NULL, NULL, NULL, Program::kCountOnlyStaticallyUsed, | 251 program->Link(NULL, NULL, NULL, Program::kCountOnlyStaticallyUsed, |
| 252 base::Bind(&ShaderCacheCb)); | 252 base::Bind(&ShaderCacheCb)); |
| 253 }; | 253 }; |
| 254 | 254 |
| 255 template <> | |
| 256 void GLES2DecoderTestBase::SpecializedSetup<cmds::GetVertexAttribfv, 0>( | |
| 257 bool valid) { | |
| 258 DoBindBuffer(GL_ARRAY_BUFFER, client_buffer_id_, kServiceBufferId); | |
| 259 DoVertexAttribPointer(1, 1, GL_FLOAT, 0, 0); | |
| 260 if (valid) { | |
| 261 EXPECT_CALL(*gl_, GetError()) | |
| 262 .WillOnce(Return(GL_NO_ERROR)) | |
| 263 .WillOnce(Return(GL_NO_ERROR)) | |
| 264 .RetiresOnSaturation(); | |
| 265 } | |
| 266 }; | |
| 267 | |
| 268 template <> | |
| 269 void GLES2DecoderTestBase::SpecializedSetup<cmds::GetVertexAttribiv, 0>( | |
| 270 bool valid) { | |
| 271 DoBindBuffer(GL_ARRAY_BUFFER, client_buffer_id_, kServiceBufferId); | |
| 272 DoVertexAttribPointer(1, 1, GL_FLOAT, 0, 0); | |
| 273 if (valid) { | |
| 274 EXPECT_CALL(*gl_, GetError()) | |
| 275 .WillOnce(Return(GL_NO_ERROR)) | |
| 276 .WillOnce(Return(GL_NO_ERROR)) | |
| 277 .RetiresOnSaturation(); | |
| 278 } | |
| 279 }; | |
| 280 | |
| 281 | |
| 282 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h" | 255 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h" |
| 283 | 256 |
| 284 } // namespace gles2 | 257 } // namespace gles2 |
| 285 } // namespace gpu | 258 } // namespace gpu |
| 286 | 259 |
| OLD | NEW |