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