| 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_implementation.h" | 10 #include "gpu/command_buffer/client/gles2_implementation.h" |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 attribs.push_back(EGL_STENCIL_SIZE); | 158 attribs.push_back(EGL_STENCIL_SIZE); |
| 159 attribs.push_back(stencil_size); | 159 attribs.push_back(stencil_size); |
| 160 // TODO(gman): Insert attrib_list. Although ES 1.1 says it must be null | 160 // TODO(gman): Insert attrib_list. Although ES 1.1 says it must be null |
| 161 attribs.push_back(EGL_NONE); | 161 attribs.push_back(EGL_NONE); |
| 162 | 162 |
| 163 if (!decoder_->Initialize(gl_surface_.get(), | 163 if (!decoder_->Initialize(gl_surface_.get(), |
| 164 gl_context_.get(), | 164 gl_context_.get(), |
| 165 gl_surface_->IsOffscreen(), | 165 gl_surface_->IsOffscreen(), |
| 166 size, | 166 size, |
| 167 gpu::gles2::DisallowedFeatures(), | 167 gpu::gles2::DisallowedFeatures(), |
| 168 NULL, | |
| 169 attribs)) { | 168 attribs)) { |
| 170 return EGL_NO_SURFACE; | 169 return EGL_NO_SURFACE; |
| 171 } | 170 } |
| 172 | 171 |
| 173 command_buffer->SetPutOffsetChangeCallback( | 172 command_buffer->SetPutOffsetChangeCallback( |
| 174 base::Bind(&gpu::GpuScheduler::PutChanged, | 173 base::Bind(&gpu::GpuScheduler::PutChanged, |
| 175 base::Unretained(gpu_scheduler_.get()))); | 174 base::Unretained(gpu_scheduler_.get()))); |
| 176 command_buffer->SetGetBufferChangeCallback( | 175 command_buffer->SetGetBufferChangeCallback( |
| 177 base::Bind(&gpu::GpuScheduler::SetGetBuffer, | 176 base::Bind(&gpu::GpuScheduler::SetGetBuffer, |
| 178 base::Unretained(gpu_scheduler_.get()))); | 177 base::Unretained(gpu_scheduler_.get()))); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 } else { | 256 } else { |
| 258 DCHECK(IsValidSurface(draw)); | 257 DCHECK(IsValidSurface(draw)); |
| 259 DCHECK(IsValidSurface(read)); | 258 DCHECK(IsValidSurface(read)); |
| 260 DCHECK(IsValidContext(ctx)); | 259 DCHECK(IsValidContext(ctx)); |
| 261 gles2::SetGLContext(context_.get()); | 260 gles2::SetGLContext(context_.get()); |
| 262 } | 261 } |
| 263 return true; | 262 return true; |
| 264 } | 263 } |
| 265 | 264 |
| 266 } // namespace egl | 265 } // namespace egl |
| OLD | NEW |