| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); | 180 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); |
| 181 | 181 |
| 182 // Context needs to be created before initializing ContextGroup, which will | 182 // Context needs to be created before initializing ContextGroup, which will |
| 183 // in turn initialize FeatureInfo, which needs a context to determine | 183 // in turn initialize FeatureInfo, which needs a context to determine |
| 184 // extension support. | 184 // extension support. |
| 185 context_ = new gfx::GLContextStubWithExtensions; | 185 context_ = new gfx::GLContextStubWithExtensions; |
| 186 context_->AddExtensionsString(normalized_init.extensions.c_str()); | 186 context_->AddExtensionsString(normalized_init.extensions.c_str()); |
| 187 context_->SetGLVersionString(normalized_init.gl_version.c_str()); | 187 context_->SetGLVersionString(normalized_init.gl_version.c_str()); |
| 188 | 188 |
| 189 context_->MakeCurrent(surface_.get()); | 189 context_->MakeCurrent(surface_.get()); |
| 190 gfx::GLSurface::InitializeDynamicMockBindingsForTests(context_); | 190 gfx::GLSurface::InitializeDynamicMockBindingsForTests(context_.get()); |
| 191 | 191 |
| 192 TestHelper::SetupContextGroupInitExpectations( | 192 TestHelper::SetupContextGroupInitExpectations( |
| 193 gl_.get(), | 193 gl_.get(), |
| 194 DisallowedFeatures(), | 194 DisallowedFeatures(), |
| 195 normalized_init.extensions.c_str(), | 195 normalized_init.extensions.c_str(), |
| 196 normalized_init.gl_version.c_str(), | 196 normalized_init.gl_version.c_str(), |
| 197 normalized_init.bind_generates_resource); | 197 normalized_init.bind_generates_resource); |
| 198 | 198 |
| 199 // We initialize the ContextGroup with a MockGLES2Decoder so that | 199 // We initialize the ContextGroup with a MockGLES2Decoder so that |
| 200 // we can use the ContextGroup to figure out how the real GLES2Decoder | 200 // we can use the ContextGroup to figure out how the real GLES2Decoder |
| (...skipping 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1661 SetupDefaultProgram(); | 1661 SetupDefaultProgram(); |
| 1662 } | 1662 } |
| 1663 | 1663 |
| 1664 // Include the auto-generated part of this file. We split this because it means | 1664 // Include the auto-generated part of this file. We split this because it means |
| 1665 // we can easily edit the non-auto generated parts right here in this file | 1665 // we can easily edit the non-auto generated parts right here in this file |
| 1666 // instead of having to edit some template or the code generator. | 1666 // instead of having to edit some template or the code generator. |
| 1667 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 1667 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
| 1668 | 1668 |
| 1669 } // namespace gles2 | 1669 } // namespace gles2 |
| 1670 } // namespace gpu | 1670 } // namespace gpu |
| OLD | NEW |