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/context_group.h" | 9 #include "gpu/command_buffer/service/context_group.h" |
10 #include "gpu/gles2_conform_support/egl/config.h" | 10 #include "gpu/gles2_conform_support/egl/config.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 return EGL_NO_SURFACE; | 118 return EGL_NO_SURFACE; |
119 | 119 |
120 gl_context_ = gfx::GLContext::CreateGLContext(NULL, gl_surface_.get()); | 120 gl_context_ = gfx::GLContext::CreateGLContext(NULL, gl_surface_.get()); |
121 if (!gl_context_.get()) | 121 if (!gl_context_.get()) |
122 return EGL_NO_SURFACE; | 122 return EGL_NO_SURFACE; |
123 | 123 |
124 std::vector<int32> attribs; | 124 std::vector<int32> attribs; |
125 if (!decoder_->Initialize(gl_surface_.get(), | 125 if (!decoder_->Initialize(gl_surface_.get(), |
126 gl_context_.get(), | 126 gl_context_.get(), |
127 gfx::Size(), | 127 gfx::Size(), |
128 gpu::gles2::DisallowedExtensions(), | 128 gpu::gles2::DisallowedFeatures(), |
129 NULL, | 129 NULL, |
130 attribs)) { | 130 attribs)) { |
131 return EGL_NO_SURFACE; | 131 return EGL_NO_SURFACE; |
132 } | 132 } |
133 | 133 |
134 command_buffer_->SetPutOffsetChangeCallback( | 134 command_buffer_->SetPutOffsetChangeCallback( |
135 NewCallback(gpu_scheduler_.get(), &gpu::GpuScheduler::PutChanged)); | 135 NewCallback(gpu_scheduler_.get(), &gpu::GpuScheduler::PutChanged)); |
136 | 136 |
137 surface_.reset(new Surface(win)); | 137 surface_.reset(new Surface(win)); |
138 | 138 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 } else { | 195 } else { |
196 DCHECK(IsValidSurface(draw)); | 196 DCHECK(IsValidSurface(draw)); |
197 DCHECK(IsValidSurface(read)); | 197 DCHECK(IsValidSurface(read)); |
198 DCHECK(IsValidContext(ctx)); | 198 DCHECK(IsValidContext(ctx)); |
199 gles2::SetGLContext(context_.get()); | 199 gles2::SetGLContext(context_.get()); |
200 } | 200 } |
201 return true; | 201 return true; |
202 } | 202 } |
203 | 203 |
204 } // namespace egl | 204 } // namespace egl |
OLD | NEW |