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/tests/gl_manager.h" | 5 #include "gpu/command_buffer/tests/gl_manager.h" |
6 | 6 |
7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
8 #include <GLES2/gl2ext.h> | 8 #include <GLES2/gl2ext.h> |
9 #include <GLES2/gl2extchromium.h> | 9 #include <GLES2/gl2extchromium.h> |
10 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 attrib_helper.context_type = options.context_type; | 216 attrib_helper.context_type = options.context_type; |
217 | 217 |
218 attrib_helper.Serialize(&attribs); | 218 attrib_helper.Serialize(&attribs); |
219 | 219 |
220 DCHECK(!command_line || !context_group); | 220 DCHECK(!command_line || !context_group); |
221 if (!context_group) { | 221 if (!context_group) { |
222 scoped_refptr<gles2::FeatureInfo> feature_info; | 222 scoped_refptr<gles2::FeatureInfo> feature_info; |
223 if (command_line) | 223 if (command_line) |
224 feature_info = new gles2::FeatureInfo(*command_line); | 224 feature_info = new gles2::FeatureInfo(*command_line); |
225 context_group = new gles2::ContextGroup( | 225 context_group = new gles2::ContextGroup( |
226 mailbox_manager_.get(), NULL, new gpu::gles2::ShaderTranslatorCache, | 226 gpu_preferences_, mailbox_manager_.get(), NULL, |
| 227 new gpu::gles2::ShaderTranslatorCache(gpu_preferences_), |
227 new gpu::gles2::FramebufferCompletenessCache, feature_info, NULL, NULL, | 228 new gpu::gles2::FramebufferCompletenessCache, feature_info, NULL, NULL, |
228 options.bind_generates_resource); | 229 options.bind_generates_resource); |
229 } | 230 } |
230 | 231 |
231 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group)); | 232 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group)); |
232 if (options.force_shader_name_hashing) { | 233 if (options.force_shader_name_hashing) { |
233 decoder_->SetForceShaderNameHashingForTest(true); | 234 decoder_->SetForceShaderNameHashingForTest(true); |
234 } | 235 } |
235 command_buffer_.reset(new CommandBufferService( | 236 command_buffer_.reset(new CommandBufferService( |
236 decoder_->GetContextGroup()->transfer_buffer_manager())); | 237 decoder_->GetContextGroup()->transfer_buffer_manager())); |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 | 547 |
547 // Something went wrong, just run the callback now. | 548 // Something went wrong, just run the callback now. |
548 callback.Run(); | 549 callback.Run(); |
549 } | 550 } |
550 | 551 |
551 bool GLManager::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) { | 552 bool GLManager::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) { |
552 return false; | 553 return false; |
553 } | 554 } |
554 | 555 |
555 } // namespace gpu | 556 } // namespace gpu |
OLD | NEW |