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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); | 208 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); |
209 | 209 |
210 // Context needs to be created before initializing ContextGroup, which will | 210 // Context needs to be created before initializing ContextGroup, which will |
211 // in turn initialize FeatureInfo, which needs a context to determine | 211 // in turn initialize FeatureInfo, which needs a context to determine |
212 // extension support. | 212 // extension support. |
213 context_ = new StrictMock<GLContextMock>(); | 213 context_ = new StrictMock<GLContextMock>(); |
214 context_->AddExtensionsString(normalized_init.extensions.c_str()); | 214 context_->AddExtensionsString(normalized_init.extensions.c_str()); |
215 context_->SetGLVersionString(normalized_init.gl_version.c_str()); | 215 context_->SetGLVersionString(normalized_init.gl_version.c_str()); |
216 | 216 |
217 context_->GLContextStubWithExtensions::MakeCurrent(surface_.get()); | 217 context_->GLContextStubWithExtensions::MakeCurrent(surface_.get()); |
218 gl::GLSurfaceTestSupport::InitializeDynamicMockBindings(context_.get()); | |
219 | 218 |
220 TestHelper::SetupContextGroupInitExpectations( | 219 TestHelper::SetupContextGroupInitExpectations( |
221 gl_.get(), | 220 gl_.get(), |
222 DisallowedFeatures(), | 221 DisallowedFeatures(), |
223 normalized_init.extensions.c_str(), | 222 normalized_init.extensions.c_str(), |
224 normalized_init.gl_version.c_str(), | 223 normalized_init.gl_version.c_str(), |
225 normalized_init.bind_generates_resource); | 224 normalized_init.bind_generates_resource); |
226 | 225 |
227 // We initialize the ContextGroup with a MockGLES2Decoder so that | 226 // We initialize the ContextGroup with a MockGLES2Decoder so that |
228 // we can use the ContextGroup to figure out how the real GLES2Decoder | 227 // we can use the ContextGroup to figure out how the real GLES2Decoder |
(...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2080 SetupDefaultProgram(); | 2079 SetupDefaultProgram(); |
2081 } | 2080 } |
2082 | 2081 |
2083 // Include the auto-generated part of this file. We split this because it means | 2082 // Include the auto-generated part of this file. We split this because it means |
2084 // we can easily edit the non-auto generated parts right here in this file | 2083 // we can easily edit the non-auto generated parts right here in this file |
2085 // instead of having to edit some template or the code generator. | 2084 // instead of having to edit some template or the code generator. |
2086 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 2085 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
2087 | 2086 |
2088 } // namespace gles2 | 2087 } // namespace gles2 |
2089 } // namespace gpu | 2088 } // namespace gpu |
OLD | NEW |