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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 } | 167 } |
168 | 168 |
169 void GLES2DecoderTestBase::InitDecoderWithCommandLine( | 169 void GLES2DecoderTestBase::InitDecoderWithCommandLine( |
170 const InitState& init, | 170 const InitState& init, |
171 const base::CommandLine* command_line) { | 171 const base::CommandLine* command_line) { |
172 InitState normalized_init = init; | 172 InitState normalized_init = init; |
173 NormalizeInitState(&normalized_init); | 173 NormalizeInitState(&normalized_init); |
174 // For easier substring/extension matching | 174 // For easier substring/extension matching |
175 DCHECK(normalized_init.extensions.empty() || | 175 DCHECK(normalized_init.extensions.empty() || |
176 *normalized_init.extensions.rbegin() == ' '); | 176 *normalized_init.extensions.rbegin() == ' '); |
177 Framebuffer::ClearFramebufferCompleteComboMap(); | |
178 | |
179 gfx::SetGLGetProcAddressProc(gfx::MockGLInterface::GetGLProcAddress); | 177 gfx::SetGLGetProcAddressProc(gfx::MockGLInterface::GetGLProcAddress); |
180 gfx::GLSurfaceTestSupport::InitializeOneOffWithMockBindings(); | 178 gfx::GLSurfaceTestSupport::InitializeOneOffWithMockBindings(); |
181 | 179 |
182 gl_.reset(new StrictMock<MockGLInterface>()); | 180 gl_.reset(new StrictMock<MockGLInterface>()); |
183 ::gfx::MockGLInterface::SetGLInterface(gl_.get()); | 181 ::gfx::MockGLInterface::SetGLInterface(gl_.get()); |
184 | 182 |
185 SetupMockGLBehaviors(); | 183 SetupMockGLBehaviors(); |
186 | 184 |
187 scoped_refptr<FeatureInfo> feature_info; | 185 scoped_refptr<FeatureInfo> feature_info; |
188 if (command_line) | 186 if (command_line) |
189 feature_info = new FeatureInfo(*command_line); | 187 feature_info = new FeatureInfo(*command_line); |
190 group_ = scoped_refptr<ContextGroup>( | 188 group_ = scoped_refptr<ContextGroup>( |
191 new ContextGroup(NULL, | 189 new ContextGroup(NULL, memory_tracker_, new ShaderTranslatorCache, |
192 memory_tracker_, | 190 new FramebufferCompletenessCache, feature_info.get(), |
193 new ShaderTranslatorCache, | 191 new SubscriptionRefSet, new ValueStateMap, |
194 feature_info.get(), | |
195 new SubscriptionRefSet, | |
196 new ValueStateMap, | |
197 normalized_init.bind_generates_resource)); | 192 normalized_init.bind_generates_resource)); |
198 bool use_default_textures = normalized_init.bind_generates_resource; | 193 bool use_default_textures = normalized_init.bind_generates_resource; |
199 | 194 |
200 InSequence sequence; | 195 InSequence sequence; |
201 | 196 |
202 surface_ = new gfx::GLSurfaceStub; | 197 surface_ = new gfx::GLSurfaceStub; |
203 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); | 198 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); |
204 | 199 |
205 // Context needs to be created before initializing ContextGroup, which will | 200 // Context needs to be created before initializing ContextGroup, which will |
206 // in turn initialize FeatureInfo, which needs a context to determine | 201 // in turn initialize FeatureInfo, which needs a context to determine |
(...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1837 SetupDefaultProgram(); | 1832 SetupDefaultProgram(); |
1838 } | 1833 } |
1839 | 1834 |
1840 // Include the auto-generated part of this file. We split this because it means | 1835 // Include the auto-generated part of this file. We split this because it means |
1841 // we can easily edit the non-auto generated parts right here in this file | 1836 // we can easily edit the non-auto generated parts right here in this file |
1842 // instead of having to edit some template or the code generator. | 1837 // instead of having to edit some template or the code generator. |
1843 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 1838 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
1844 | 1839 |
1845 } // namespace gles2 | 1840 } // namespace gles2 |
1846 } // namespace gpu | 1841 } // namespace gpu |
OLD | NEW |