| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 if (surface_ != NULL) { | 80 if (surface_ != NULL) { |
| 81 // We do not support more than one window surface. | 81 // We do not support more than one window surface. |
| 82 return EGL_NO_SURFACE; | 82 return EGL_NO_SURFACE; |
| 83 } | 83 } |
| 84 | 84 |
| 85 scoped_ptr<gpu::CommandBufferService> command_buffer( | 85 scoped_ptr<gpu::CommandBufferService> command_buffer( |
| 86 new gpu::CommandBufferService); | 86 new gpu::CommandBufferService); |
| 87 if (!command_buffer->Initialize()) | 87 if (!command_buffer->Initialize()) |
| 88 return NULL; | 88 return NULL; |
| 89 | 89 |
| 90 gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(true)); | 90 gpu::gles2::ContextGroup::Ref group(new gpu::gles2::ContextGroup(NULL, true)); |
| 91 | 91 |
| 92 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); | 92 decoder_.reset(gpu::gles2::GLES2Decoder::Create(group.get())); |
| 93 if (!decoder_.get()) | 93 if (!decoder_.get()) |
| 94 return EGL_NO_SURFACE; | 94 return EGL_NO_SURFACE; |
| 95 | 95 |
| 96 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(), | 96 gpu_scheduler_.reset(new gpu::GpuScheduler(command_buffer.get(), |
| 97 decoder_.get(), | 97 decoder_.get(), |
| 98 NULL)); | 98 NULL)); |
| 99 | 99 |
| 100 decoder_->set_engine(gpu_scheduler_.get()); | 100 decoder_->set_engine(gpu_scheduler_.get()); |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 } else { | 207 } else { |
| 208 DCHECK(IsValidSurface(draw)); | 208 DCHECK(IsValidSurface(draw)); |
| 209 DCHECK(IsValidSurface(read)); | 209 DCHECK(IsValidSurface(read)); |
| 210 DCHECK(IsValidContext(ctx)); | 210 DCHECK(IsValidContext(ctx)); |
| 211 gles2::SetGLContext(context_.get()); | 211 gles2::SetGLContext(context_.get()); |
| 212 } | 212 } |
| 213 return true; | 213 return true; |
| 214 } | 214 } |
| 215 | 215 |
| 216 } // namespace egl | 216 } // namespace egl |
| OLD | NEW |