| 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 transfer_buffer_manager->Initialize(); | 257 transfer_buffer_manager->Initialize(); |
| 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)); | 267 new gpu::gles2::FramebufferCompletenessCache, feature_info, true, |
| 268 nullptr)); |
| 268 | 269 |
| 269 std::unique_ptr<gpu::gles2::GLES2Decoder> decoder( | 270 std::unique_ptr<gpu::gles2::GLES2Decoder> decoder( |
| 270 gpu::gles2::GLES2Decoder::Create(group.get())); | 271 gpu::gles2::GLES2Decoder::Create(group.get())); |
| 271 if (!decoder.get()) | 272 if (!decoder.get()) |
| 272 return false; | 273 return false; |
| 273 | 274 |
| 274 std::unique_ptr<gpu::CommandExecutor> command_executor( | 275 std::unique_ptr<gpu::CommandExecutor> command_executor( |
| 275 new gpu::CommandExecutor(command_buffer.get(), decoder.get(), | 276 new gpu::CommandExecutor(command_buffer.get(), decoder.get(), |
| 276 decoder.get())); | 277 decoder.get())); |
| 277 | 278 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 return false; | 392 return false; |
| 392 if (!gl_context_->MakeCurrent(gl_surface)) { | 393 if (!gl_context_->MakeCurrent(gl_surface)) { |
| 393 MarkServiceContextLost(); | 394 MarkServiceContextLost(); |
| 394 return false; | 395 return false; |
| 395 } | 396 } |
| 396 client_gl_context_->Flush(); | 397 client_gl_context_->Flush(); |
| 397 return true; | 398 return true; |
| 398 } | 399 } |
| 399 | 400 |
| 400 } // namespace egl | 401 } // namespace egl |
| OLD | NEW |