| 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" |
| 11 #include "gpu/command_buffer/service/context_group.h" | 11 #include "gpu/command_buffer/service/context_group.h" |
| 12 #include "gpu/command_buffer/service/program_manager.h" | 12 #include "gpu/command_buffer/service/program_manager.h" |
| 13 #include "gpu/command_buffer/service/test_helper.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
| 14 #include "ui/gl/gl_mock.h" | 15 #include "ui/gl/gl_mock.h" |
| 15 | 16 |
| 16 using ::gfx::MockGLInterface; | 17 using ::gfx::MockGLInterface; |
| 17 using ::testing::_; | 18 using ::testing::_; |
| 18 using ::testing::DoAll; | 19 using ::testing::DoAll; |
| 19 using ::testing::InSequence; | 20 using ::testing::InSequence; |
| 20 using ::testing::MatcherCast; | 21 using ::testing::MatcherCast; |
| 21 using ::testing::Pointee; | 22 using ::testing::Pointee; |
| 22 using ::testing::Return; | 23 using ::testing::Return; |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 const GLuint kClientVertexShaderId = 5001; | 189 const GLuint kClientVertexShaderId = 5001; |
| 189 const GLuint kServiceVertexShaderId = 6001; | 190 const GLuint kServiceVertexShaderId = 6001; |
| 190 const GLuint kClientFragmentShaderId = 5002; | 191 const GLuint kClientFragmentShaderId = 5002; |
| 191 const GLuint kServiceFragmentShaderId = 6002; | 192 const GLuint kServiceFragmentShaderId = 6002; |
| 192 const char* log = "hello"; // Matches auto-generated unit test. | 193 const char* log = "hello"; // Matches auto-generated unit test. |
| 193 DoCreateShader( | 194 DoCreateShader( |
| 194 GL_VERTEX_SHADER, kClientVertexShaderId, kServiceVertexShaderId); | 195 GL_VERTEX_SHADER, kClientVertexShaderId, kServiceVertexShaderId); |
| 195 DoCreateShader( | 196 DoCreateShader( |
| 196 GL_FRAGMENT_SHADER, kClientFragmentShaderId, kServiceFragmentShaderId); | 197 GL_FRAGMENT_SHADER, kClientFragmentShaderId, kServiceFragmentShaderId); |
| 197 | 198 |
| 198 GetShader(kClientVertexShaderId)->SetStatus(true, "", NULL); | 199 TestHelper::SetShaderStates( |
| 199 GetShader(kClientFragmentShaderId)->SetStatus(true, "", NULL); | 200 gl_.get(), GetShader(kClientVertexShaderId), true); |
| 201 TestHelper::SetShaderStates( |
| 202 gl_.get(), GetShader(kClientFragmentShaderId), true); |
| 200 | 203 |
| 201 InSequence dummy; | 204 InSequence dummy; |
| 202 EXPECT_CALL(*gl_, | 205 EXPECT_CALL(*gl_, |
| 203 AttachShader(kServiceProgramId, kServiceVertexShaderId)) | 206 AttachShader(kServiceProgramId, kServiceVertexShaderId)) |
| 204 .Times(1) | 207 .Times(1) |
| 205 .RetiresOnSaturation(); | 208 .RetiresOnSaturation(); |
| 206 EXPECT_CALL(*gl_, | 209 EXPECT_CALL(*gl_, |
| 207 AttachShader(kServiceProgramId, kServiceFragmentShaderId)) | 210 AttachShader(kServiceProgramId, kServiceFragmentShaderId)) |
| 208 .Times(1) | 211 .Times(1) |
| 209 .RetiresOnSaturation(); | 212 .RetiresOnSaturation(); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 .RetiresOnSaturation(); | 297 .RetiresOnSaturation(); |
| 295 } | 298 } |
| 296 } | 299 } |
| 297 | 300 |
| 298 | 301 |
| 299 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h" | 302 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h" |
| 300 | 303 |
| 301 } // namespace gles2 | 304 } // namespace gles2 |
| 302 } // namespace gpu | 305 } // namespace gpu |
| 303 | 306 |
| OLD | NEW |