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/gles2_conform_support/egl/display.h" | 5 #include "gpu/gles2_conform_support/egl/display.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "gpu/command_buffer/client/gles2_lib.h" | 10 #include "gpu/command_buffer/client/gles2_lib.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 { | 86 { |
87 gpu::TransferBufferManager* manager = new gpu::TransferBufferManager(); | 87 gpu::TransferBufferManager* manager = new gpu::TransferBufferManager(); |
88 transfer_buffer_manager_.reset(manager); | 88 transfer_buffer_manager_.reset(manager); |
89 manager->Initialize(); | 89 manager->Initialize(); |
90 } | 90 } |
91 scoped_ptr<gpu::CommandBufferService> command_buffer( | 91 scoped_ptr<gpu::CommandBufferService> command_buffer( |
92 new gpu::CommandBufferService(transfer_buffer_manager_.get())); | 92 new gpu::CommandBufferService(transfer_buffer_manager_.get())); |
93 if (!command_buffer->Initialize()) | 93 if (!command_buffer->Initialize()) |
94 return NULL; | 94 return NULL; |
95 | 95 |
96 gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(NULL, true)); | 96 gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(NULL, |
| 97 NULL, |
| 98 true)); |
97 | 99 |
98 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); | 100 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); |
99 if (!decoder_.get()) | 101 if (!decoder_.get()) |
100 return EGL_NO_SURFACE; | 102 return EGL_NO_SURFACE; |
101 | 103 |
102 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(), | 104 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(), |
103 decoder_.get(), | 105 decoder_.get(), |
104 NULL)); | 106 NULL)); |
105 | 107 |
106 decoder_->set_engine(gpu_scheduler_.get()); | 108 decoder_->set_engine(gpu_scheduler_.get()); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 } else { | 217 } else { |
216 DCHECK(IsValidSurface(draw)); | 218 DCHECK(IsValidSurface(draw)); |
217 DCHECK(IsValidSurface(read)); | 219 DCHECK(IsValidSurface(read)); |
218 DCHECK(IsValidContext(ctx)); | 220 DCHECK(IsValidContext(ctx)); |
219 gles2::SetGLContext(context_.get()); | 221 gles2::SetGLContext(context_.get()); |
220 } | 222 } |
221 return true; | 223 return true; |
222 } | 224 } |
223 | 225 |
224 } // namespace egl | 226 } // namespace egl |
OLD | NEW |