| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "gpu/command_buffer/client/gles2_lib.h" | 8 #include "gpu/command_buffer/client/gles2_lib.h" |
| 9 #include "gpu/command_buffer/service/command_buffer_service.h" | 9 #include "gpu/command_buffer/service/command_buffer_service.h" |
| 10 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 10 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 EGLNativeWindowType win, | 102 EGLNativeWindowType win, |
| 103 const EGLint* attrib_list) { | 103 const EGLint* attrib_list) { |
| 104 if (surface_ != NULL) { | 104 if (surface_ != NULL) { |
| 105 // We do not support more than one window surface. | 105 // We do not support more than one window surface. |
| 106 return EGL_NO_SURFACE; | 106 return EGL_NO_SURFACE; |
| 107 } | 107 } |
| 108 | 108 |
| 109 using gpu::GpuScheduler; | 109 using gpu::GpuScheduler; |
| 110 std::vector<int32> attribs; | 110 std::vector<int32> attribs; |
| 111 scoped_ptr<GpuScheduler> gpu_scheduler( | 111 scoped_ptr<GpuScheduler> gpu_scheduler( |
| 112 GpuScheduler::Create(command_buffer_.get(), | 112 new GpuScheduler(command_buffer_.get(), NULL, NULL)); |
| 113 NULL, | |
| 114 NULL)); | |
| 115 if (!gpu_scheduler->Initialize( | 113 if (!gpu_scheduler->Initialize( |
| 116 win, gfx::Size(), gpu::gles2::DisallowedExtensions(), NULL, | 114 win, gfx::Size(), gpu::gles2::DisallowedExtensions(), NULL, |
| 117 attribs, NULL)) | 115 attribs, NULL)) |
| 118 return EGL_NO_SURFACE; | 116 return EGL_NO_SURFACE; |
| 119 | 117 |
| 120 command_buffer_->SetPutOffsetChangeCallback( | 118 command_buffer_->SetPutOffsetChangeCallback( |
| 121 NewCallback(gpu_scheduler.get(), &GpuScheduler::PutChanged)); | 119 NewCallback(gpu_scheduler.get(), &GpuScheduler::PutChanged)); |
| 122 gpu_scheduler_.reset(gpu_scheduler.release()); | 120 gpu_scheduler_.reset(gpu_scheduler.release()); |
| 123 surface_.reset(new Surface(win)); | 121 surface_.reset(new Surface(win)); |
| 124 | 122 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 } else { | 178 } else { |
| 181 DCHECK(IsValidSurface(draw)); | 179 DCHECK(IsValidSurface(draw)); |
| 182 DCHECK(IsValidSurface(read)); | 180 DCHECK(IsValidSurface(read)); |
| 183 DCHECK(IsValidContext(ctx)); | 181 DCHECK(IsValidContext(ctx)); |
| 184 gles2::SetGLContext(context_.get()); | 182 gles2::SetGLContext(context_.get()); |
| 185 } | 183 } |
| 186 return true; | 184 return true; |
| 187 } | 185 } |
| 188 | 186 |
| 189 } // namespace egl | 187 } // namespace egl |
| OLD | NEW |