Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc

Issue 2129043003: Make dynamic mock bindings initialization consistent with other GL implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | gpu/command_buffer/service/gpu_service_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/gpu_service_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698