| 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, | 96 gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(NULL, true)); |
| 97 true, | |
| 98 NULL)); | |
| 99 | 97 |
| 100 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); | 98 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); |
| 101 if (!decoder_.get()) | 99 if (!decoder_.get()) |
| 102 return EGL_NO_SURFACE; | 100 return EGL_NO_SURFACE; |
| 103 | 101 |
| 104 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(), | 102 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(), |
| 105 decoder_.get(), | 103 decoder_.get(), |
| 106 NULL)); | 104 NULL)); |
| 107 | 105 |
| 108 decoder_->set_engine(gpu_scheduler_.get()); | 106 decoder_->set_engine(gpu_scheduler_.get()); |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 } else { | 215 } else { |
| 218 DCHECK(IsValidSurface(draw)); | 216 DCHECK(IsValidSurface(draw)); |
| 219 DCHECK(IsValidSurface(read)); | 217 DCHECK(IsValidSurface(read)); |
| 220 DCHECK(IsValidContext(ctx)); | 218 DCHECK(IsValidContext(ctx)); |
| 221 gles2::SetGLContext(context_.get()); | 219 gles2::SetGLContext(context_.get()); |
| 222 } | 220 } |
| 223 return true; | 221 return true; |
| 224 } | 222 } |
| 225 | 223 |
| 226 } // namespace egl | 224 } // namespace egl |
| OLD | NEW |