OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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/gles2_conform_support/egl/context.h" | 5 #include "gpu/gles2_conform_support/egl/context.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "gpu/command_buffer/client/gles2_implementation.h" | 10 #include "gpu/command_buffer/client/gles2_implementation.h" |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 | 258 |
259 std::unique_ptr<gpu::CommandBufferService> command_buffer( | 259 std::unique_ptr<gpu::CommandBufferService> command_buffer( |
260 new gpu::CommandBufferService(transfer_buffer_manager.get())); | 260 new gpu::CommandBufferService(transfer_buffer_manager.get())); |
261 | 261 |
262 scoped_refptr<gpu::gles2::FeatureInfo> feature_info( | 262 scoped_refptr<gpu::gles2::FeatureInfo> feature_info( |
263 new gpu::gles2::FeatureInfo(gpu_driver_bug_workarounds_)); | 263 new gpu::gles2::FeatureInfo(gpu_driver_bug_workarounds_)); |
264 scoped_refptr<gpu::gles2::ContextGroup> group(new gpu::gles2::ContextGroup( | 264 scoped_refptr<gpu::gles2::ContextGroup> group(new gpu::gles2::ContextGroup( |
265 gpu_preferences_, nullptr, nullptr, | 265 gpu_preferences_, nullptr, nullptr, |
266 new gpu::gles2::ShaderTranslatorCache(gpu_preferences_), | 266 new gpu::gles2::ShaderTranslatorCache(gpu_preferences_), |
267 new gpu::gles2::FramebufferCompletenessCache, feature_info, true, nullptr, | 267 new gpu::gles2::FramebufferCompletenessCache, feature_info, true, nullptr, |
268 nullptr)); | 268 nullptr, gpu::GpuFeatureInfo())); |
269 | 269 |
270 std::unique_ptr<gpu::gles2::GLES2Decoder> decoder( | 270 std::unique_ptr<gpu::gles2::GLES2Decoder> decoder( |
271 gpu::gles2::GLES2Decoder::Create(group.get())); | 271 gpu::gles2::GLES2Decoder::Create(group.get())); |
272 if (!decoder.get()) | 272 if (!decoder.get()) |
273 return false; | 273 return false; |
274 | 274 |
275 std::unique_ptr<gpu::CommandExecutor> command_executor( | 275 std::unique_ptr<gpu::CommandExecutor> command_executor( |
276 new gpu::CommandExecutor(command_buffer.get(), decoder.get(), | 276 new gpu::CommandExecutor(command_buffer.get(), decoder.get(), |
277 decoder.get())); | 277 decoder.get())); |
278 | 278 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 return false; | 395 return false; |
396 if (!gl_context_->MakeCurrent(gl_surface)) { | 396 if (!gl_context_->MakeCurrent(gl_surface)) { |
397 MarkServiceContextLost(); | 397 MarkServiceContextLost(); |
398 return false; | 398 return false; |
399 } | 399 } |
400 client_gl_context_->Flush(); | 400 client_gl_context_->Flush(); |
401 return true; | 401 return true; |
402 } | 402 } |
403 | 403 |
404 } // namespace egl | 404 } // namespace egl |
OLD | NEW |