| 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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 DCHECK(normalized_init.extensions.empty() || | 181 DCHECK(normalized_init.extensions.empty() || |
| 182 *normalized_init.extensions.rbegin() == ' '); | 182 *normalized_init.extensions.rbegin() == ' '); |
| 183 gfx::SetGLGetProcAddressProc(gfx::MockGLInterface::GetGLProcAddress); | 183 gfx::SetGLGetProcAddressProc(gfx::MockGLInterface::GetGLProcAddress); |
| 184 gfx::GLSurfaceTestSupport::InitializeOneOffWithMockBindings(); | 184 gfx::GLSurfaceTestSupport::InitializeOneOffWithMockBindings(); |
| 185 | 185 |
| 186 gl_.reset(new StrictMock<MockGLInterface>()); | 186 gl_.reset(new StrictMock<MockGLInterface>()); |
| 187 ::gfx::MockGLInterface::SetGLInterface(gl_.get()); | 187 ::gfx::MockGLInterface::SetGLInterface(gl_.get()); |
| 188 | 188 |
| 189 SetupMockGLBehaviors(); | 189 SetupMockGLBehaviors(); |
| 190 | 190 |
| 191 scoped_refptr<FeatureInfo> feature_info; | 191 scoped_refptr<FeatureInfo> feature_info = new FeatureInfo; |
| 192 if (command_line) | 192 if (command_line) { |
| 193 feature_info = new FeatureInfo(*command_line); | 193 GpuDriverBugWorkarounds gpu_driver_bug_workaround(command_line); |
| 194 group_ = scoped_refptr<ContextGroup>( | 194 feature_info = new FeatureInfo(*command_line, gpu_driver_bug_workaround); |
| 195 new ContextGroup(gpu_preferences_, NULL, memory_tracker_, | 195 } |
| 196 new ShaderTranslatorCache(gpu_preferences_), | 196 |
| 197 new FramebufferCompletenessCache, feature_info.get(), | 197 group_ = scoped_refptr<ContextGroup>(new ContextGroup( |
| 198 new SubscriptionRefSet, new ValueStateMap, | 198 gpu_preferences_, NULL, memory_tracker_, |
| 199 normalized_init.bind_generates_resource)); | 199 new ShaderTranslatorCache(gpu_preferences_), |
| 200 new FramebufferCompletenessCache, feature_info, new SubscriptionRefSet, |
| 201 new ValueStateMap, normalized_init.bind_generates_resource)); |
| 200 bool use_default_textures = normalized_init.bind_generates_resource; | 202 bool use_default_textures = normalized_init.bind_generates_resource; |
| 201 | 203 |
| 202 InSequence sequence; | 204 InSequence sequence; |
| 203 | 205 |
| 204 surface_ = new gfx::GLSurfaceStub; | 206 surface_ = new gfx::GLSurfaceStub; |
| 205 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); | 207 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); |
| 206 | 208 |
| 207 // Context needs to be created before initializing ContextGroup, which will | 209 // Context needs to be created before initializing ContextGroup, which will |
| 208 // in turn initialize FeatureInfo, which needs a context to determine | 210 // in turn initialize FeatureInfo, which needs a context to determine |
| 209 // extension support. | 211 // extension support. |
| (...skipping 1822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2032 SetupDefaultProgram(); | 2034 SetupDefaultProgram(); |
| 2033 } | 2035 } |
| 2034 | 2036 |
| 2035 // Include the auto-generated part of this file. We split this because it means | 2037 // Include the auto-generated part of this file. We split this because it means |
| 2036 // we can easily edit the non-auto generated parts right here in this file | 2038 // we can easily edit the non-auto generated parts right here in this file |
| 2037 // instead of having to edit some template or the code generator. | 2039 // instead of having to edit some template or the code generator. |
| 2038 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 2040 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
| 2039 | 2041 |
| 2040 } // namespace gles2 | 2042 } // namespace gles2 |
| 2041 } // namespace gpu | 2043 } // namespace gpu |
| OLD | NEW |