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 "gpu/command_buffer/client/gles2_implementation.h" | 9 #include "gpu/command_buffer/client/gles2_implementation.h" |
10 #include "gpu/command_buffer/client/gles2_lib.h" | 10 #include "gpu/command_buffer/client/gles2_lib.h" |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 scoped_refptr<gpu::TransferBufferManager> transfer_buffer_manager( | 248 scoped_refptr<gpu::TransferBufferManager> transfer_buffer_manager( |
249 new gpu::TransferBufferManager(nullptr)); | 249 new gpu::TransferBufferManager(nullptr)); |
250 transfer_buffer_manager->Initialize(); | 250 transfer_buffer_manager->Initialize(); |
251 | 251 |
252 scoped_ptr<gpu::CommandBufferService> command_buffer( | 252 scoped_ptr<gpu::CommandBufferService> command_buffer( |
253 new gpu::CommandBufferService(transfer_buffer_manager.get())); | 253 new gpu::CommandBufferService(transfer_buffer_manager.get())); |
254 if (!command_buffer->Initialize()) | 254 if (!command_buffer->Initialize()) |
255 return false; | 255 return false; |
256 | 256 |
257 scoped_refptr<gpu::gles2::ContextGroup> group(new gpu::gles2::ContextGroup( | 257 scoped_refptr<gpu::gles2::ContextGroup> group(new gpu::gles2::ContextGroup( |
258 NULL, NULL, new gpu::gles2::ShaderTranslatorCache, | 258 display_->gpu_preferences(), NULL, NULL, |
| 259 new gpu::gles2::ShaderTranslatorCache(display_->gpu_preferences()), |
259 new gpu::gles2::FramebufferCompletenessCache, NULL, NULL, NULL, true)); | 260 new gpu::gles2::FramebufferCompletenessCache, NULL, NULL, NULL, true)); |
260 | 261 |
261 scoped_ptr<gpu::gles2::GLES2Decoder> decoder( | 262 scoped_ptr<gpu::gles2::GLES2Decoder> decoder( |
262 gpu::gles2::GLES2Decoder::Create(group.get())); | 263 gpu::gles2::GLES2Decoder::Create(group.get())); |
263 if (!decoder.get()) | 264 if (!decoder.get()) |
264 return false; | 265 return false; |
265 | 266 |
266 scoped_ptr<gpu::GpuScheduler> gpu_scheduler(new gpu::GpuScheduler( | 267 scoped_ptr<gpu::GpuScheduler> gpu_scheduler(new gpu::GpuScheduler( |
267 command_buffer.get(), decoder.get(), decoder.get())); | 268 command_buffer.get(), decoder.get(), decoder.get())); |
268 | 269 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 return false; | 382 return false; |
382 if (!gl_context_->MakeCurrent(gl_surface)) { | 383 if (!gl_context_->MakeCurrent(gl_surface)) { |
383 MarkServiceContextLost(); | 384 MarkServiceContextLost(); |
384 return false; | 385 return false; |
385 } | 386 } |
386 client_gl_context_->Flush(); | 387 client_gl_context_->Flush(); |
387 return true; | 388 return true; |
388 } | 389 } |
389 | 390 |
390 } // namespace egl | 391 } // namespace egl |
OLD | NEW |