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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 | 202 |
203 InSequence sequence; | 203 InSequence sequence; |
204 | 204 |
205 surface_ = new gl::GLSurfaceStub; | 205 surface_ = new gl::GLSurfaceStub; |
206 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); | 206 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); |
207 | 207 |
208 // Context needs to be created before initializing ContextGroup, which will | 208 // Context needs to be created before initializing ContextGroup, which will |
209 // in turn initialize FeatureInfo, which needs a context to determine | 209 // in turn initialize FeatureInfo, which needs a context to determine |
210 // extension support. | 210 // extension support. |
211 context_ = new StrictMock<GLContextMock>(); | 211 context_ = new StrictMock<GLContextMock>(); |
212 context_->AddExtensionsString(normalized_init.extensions.c_str()); | 212 context_->SetExtensionsString(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_->GLContextStub::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 init.context_type, |
223 normalized_init.bind_generates_resource); | 223 normalized_init.bind_generates_resource); |
224 | 224 |
225 // We initialize the ContextGroup with a MockGLES2Decoder so that | 225 // We initialize the ContextGroup with a MockGLES2Decoder so that |
(...skipping 1955 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2181 SetupDefaultProgram(); | 2181 SetupDefaultProgram(); |
2182 } | 2182 } |
2183 | 2183 |
2184 // Include the auto-generated part of this file. We split this because it means | 2184 // Include the auto-generated part of this file. We split this because it means |
2185 // we can easily edit the non-auto generated parts right here in this file | 2185 // we can easily edit the non-auto generated parts right here in this file |
2186 // instead of having to edit some template or the code generator. | 2186 // instead of having to edit some template or the code generator. |
2187 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 2187 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
2188 | 2188 |
2189 } // namespace gles2 | 2189 } // namespace gles2 |
2190 } // namespace gpu | 2190 } // namespace gpu |
OLD | NEW |