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_implementation.h" | 10 #include "gpu/command_buffer/client/gles2_implementation.h" |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 { | 105 { |
106 gpu::TransferBufferManager* manager = new gpu::TransferBufferManager(); | 106 gpu::TransferBufferManager* manager = new gpu::TransferBufferManager(); |
107 transfer_buffer_manager_.reset(manager); | 107 transfer_buffer_manager_.reset(manager); |
108 manager->Initialize(); | 108 manager->Initialize(); |
109 } | 109 } |
110 scoped_ptr<gpu::CommandBufferService> command_buffer( | 110 scoped_ptr<gpu::CommandBufferService> command_buffer( |
111 new gpu::CommandBufferService(transfer_buffer_manager_.get())); | 111 new gpu::CommandBufferService(transfer_buffer_manager_.get())); |
112 if (!command_buffer->Initialize()) | 112 if (!command_buffer->Initialize()) |
113 return NULL; | 113 return NULL; |
114 | 114 |
115 gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(NULL, | 115 scoped_refptr<gpu::gles2::ContextGroup> group( |
116 NULL, | 116 new gpu::gles2::ContextGroup(NULL, NULL, NULL, true)); |
117 NULL, | |
118 true)); | |
119 | 117 |
120 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); | 118 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); |
121 if (!decoder_.get()) | 119 if (!decoder_.get()) |
122 return EGL_NO_SURFACE; | 120 return EGL_NO_SURFACE; |
123 | 121 |
124 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(), | 122 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(), |
125 decoder_.get(), | 123 decoder_.get(), |
126 NULL)); | 124 NULL)); |
127 | 125 |
128 decoder_->set_engine(gpu_scheduler_.get()); | 126 decoder_->set_engine(gpu_scheduler_.get()); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 } else { | 257 } else { |
260 DCHECK(IsValidSurface(draw)); | 258 DCHECK(IsValidSurface(draw)); |
261 DCHECK(IsValidSurface(read)); | 259 DCHECK(IsValidSurface(read)); |
262 DCHECK(IsValidContext(ctx)); | 260 DCHECK(IsValidContext(ctx)); |
263 gles2::SetGLContext(context_.get()); | 261 gles2::SetGLContext(context_.get()); |
264 } | 262 } |
265 return true; | 263 return true; |
266 } | 264 } |
267 | 265 |
268 } // namespace egl | 266 } // namespace egl |
OLD | NEW |