| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 { | 89 { |
| 90 gpu::TransferBufferManager* manager = new gpu::TransferBufferManager(); | 90 gpu::TransferBufferManager* manager = new gpu::TransferBufferManager(); |
| 91 transfer_buffer_manager_.reset(manager); | 91 transfer_buffer_manager_.reset(manager); |
| 92 manager->Initialize(); | 92 manager->Initialize(); |
| 93 } | 93 } |
| 94 scoped_ptr<gpu::CommandBufferService> command_buffer( | 94 scoped_ptr<gpu::CommandBufferService> command_buffer( |
| 95 new gpu::CommandBufferService(transfer_buffer_manager_.get())); | 95 new gpu::CommandBufferService(transfer_buffer_manager_.get())); |
| 96 if (!command_buffer->Initialize()) | 96 if (!command_buffer->Initialize()) |
| 97 return NULL; | 97 return NULL; |
| 98 | 98 |
| 99 gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(NULL, true)); | 99 gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(NULL, |
| 100 NULL, |
| 101 true)); |
| 100 | 102 |
| 101 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); | 103 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); |
| 102 if (!decoder_.get()) | 104 if (!decoder_.get()) |
| 103 return EGL_NO_SURFACE; | 105 return EGL_NO_SURFACE; |
| 104 | 106 |
| 105 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(), | 107 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(), |
| 106 decoder_.get(), | 108 decoder_.get(), |
| 107 NULL)); | 109 NULL)); |
| 108 | 110 |
| 109 decoder_->set_engine(gpu_scheduler_.get()); | 111 decoder_->set_engine(gpu_scheduler_.get()); |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 } else { | 227 } else { |
| 226 DCHECK(IsValidSurface(draw)); | 228 DCHECK(IsValidSurface(draw)); |
| 227 DCHECK(IsValidSurface(read)); | 229 DCHECK(IsValidSurface(read)); |
| 228 DCHECK(IsValidContext(ctx)); | 230 DCHECK(IsValidContext(ctx)); |
| 229 gles2::SetGLContext(context_.get()); | 231 gles2::SetGLContext(context_.get()); |
| 230 } | 232 } |
| 231 return true; | 233 return true; |
| 232 } | 234 } |
| 233 | 235 |
| 234 } // namespace egl | 236 } // namespace egl |
| OLD | NEW |