| 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_unittest_base.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 context_->AddExtensionsString(normalized_init.extensions.c_str()); | 212 context_->AddExtensionsString(normalized_init.extensions.c_str()); |
| 213 context_->SetGLVersionString(normalized_init.gl_version.c_str()); | 213 context_->SetGLVersionString(normalized_init.gl_version.c_str()); |
| 214 | 214 |
| 215 context_->GLContextStubWithExtensions::MakeCurrent(surface_.get()); | 215 context_->GLContextStubWithExtensions::MakeCurrent(surface_.get()); |
| 216 | 216 |
| 217 TestHelper::SetupContextGroupInitExpectations( | 217 TestHelper::SetupContextGroupInitExpectations( |
| 218 gl_.get(), | 218 gl_.get(), |
| 219 DisallowedFeatures(), | 219 DisallowedFeatures(), |
| 220 normalized_init.extensions.c_str(), | 220 normalized_init.extensions.c_str(), |
| 221 normalized_init.gl_version.c_str(), | 221 normalized_init.gl_version.c_str(), |
| 222 init.context_type, |
| 222 normalized_init.bind_generates_resource); | 223 normalized_init.bind_generates_resource); |
| 223 | 224 |
| 224 // We initialize the ContextGroup with a MockGLES2Decoder so that | 225 // We initialize the ContextGroup with a MockGLES2Decoder so that |
| 225 // we can use the ContextGroup to figure out how the real GLES2Decoder | 226 // we can use the ContextGroup to figure out how the real GLES2Decoder |
| 226 // will initialize itself. | 227 // will initialize itself. |
| 227 mock_decoder_.reset(new MockGLES2Decoder()); | 228 mock_decoder_.reset(new MockGLES2Decoder()); |
| 228 | 229 |
| 229 // Install FakeDoCommands handler so we can use individual DoCommand() | 230 // Install FakeDoCommands handler so we can use individual DoCommand() |
| 230 // expectations. | 231 // expectations. |
| 231 EXPECT_CALL(*mock_decoder_, DoCommands(_, _, _, _)).WillRepeatedly( | 232 EXPECT_CALL(*mock_decoder_, DoCommands(_, _, _, _)).WillRepeatedly( |
| (...skipping 1891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2123 SetupDefaultProgram(); | 2124 SetupDefaultProgram(); |
| 2124 } | 2125 } |
| 2125 | 2126 |
| 2126 // Include the auto-generated part of this file. We split this because it means | 2127 // Include the auto-generated part of this file. We split this because it means |
| 2127 // we can easily edit the non-auto generated parts right here in this file | 2128 // we can easily edit the non-auto generated parts right here in this file |
| 2128 // instead of having to edit some template or the code generator. | 2129 // instead of having to edit some template or the code generator. |
| 2129 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 2130 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
| 2130 | 2131 |
| 2131 } // namespace gles2 | 2132 } // namespace gles2 |
| 2132 } // namespace gpu | 2133 } // namespace gpu |
| OLD | NEW |