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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 attribs.should_use_native_gmb_for_backbuffer = | 294 attribs.should_use_native_gmb_for_backbuffer = |
295 options.image_factory != nullptr; | 295 options.image_factory != nullptr; |
296 attribs.offscreen_framebuffer_size = options.size; | 296 attribs.offscreen_framebuffer_size = options.size; |
297 attribs.buffer_preserved = options.preserve_backbuffer; | 297 attribs.buffer_preserved = options.preserve_backbuffer; |
298 | 298 |
299 if (!context_group) { | 299 if (!context_group) { |
300 GpuDriverBugWorkarounds gpu_driver_bug_workaround(&command_line); | 300 GpuDriverBugWorkarounds gpu_driver_bug_workaround(&command_line); |
301 scoped_refptr<gles2::FeatureInfo> feature_info = | 301 scoped_refptr<gles2::FeatureInfo> feature_info = |
302 new gles2::FeatureInfo(command_line, gpu_driver_bug_workaround); | 302 new gles2::FeatureInfo(command_line, gpu_driver_bug_workaround); |
303 context_group = new gles2::ContextGroup( | 303 context_group = new gles2::ContextGroup( |
304 gpu_preferences_, mailbox_manager_.get(), NULL, | 304 gpu_preferences_, mailbox_manager_.get(), nullptr, |
305 new gpu::gles2::ShaderTranslatorCache(gpu_preferences_), | 305 new gpu::gles2::ShaderTranslatorCache(gpu_preferences_), |
306 new gpu::gles2::FramebufferCompletenessCache, feature_info, | 306 new gpu::gles2::FramebufferCompletenessCache, feature_info, |
307 options.bind_generates_resource, options.image_factory); | 307 options.bind_generates_resource, options.image_factory, nullptr); |
308 } | 308 } |
309 | 309 |
310 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group)); | 310 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group)); |
311 if (options.force_shader_name_hashing) { | 311 if (options.force_shader_name_hashing) { |
312 decoder_->SetForceShaderNameHashingForTest(true); | 312 decoder_->SetForceShaderNameHashingForTest(true); |
313 } | 313 } |
314 command_buffer_.reset(new CommandBufferService( | 314 command_buffer_.reset(new CommandBufferService( |
315 decoder_->GetContextGroup()->transfer_buffer_manager())); | 315 decoder_->GetContextGroup()->transfer_buffer_manager())); |
316 | 316 |
317 executor_.reset(new CommandExecutor(command_buffer_.get(), decoder_.get(), | 317 executor_.reset(new CommandExecutor(command_buffer_.get(), decoder_.get(), |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 | 630 |
631 // Something went wrong, just run the callback now. | 631 // Something went wrong, just run the callback now. |
632 callback.Run(); | 632 callback.Run(); |
633 } | 633 } |
634 | 634 |
635 bool GLManager::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) { | 635 bool GLManager::CanWaitUnverifiedSyncToken(const gpu::SyncToken* sync_token) { |
636 return false; | 636 return false; |
637 } | 637 } |
638 | 638 |
639 } // namespace gpu | 639 } // namespace gpu |
OLD | NEW |