| 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 return EGL_NO_CONTEXT; | 223 return EGL_NO_CONTEXT; |
| 224 | 224 |
| 225 DCHECK(command_buffer_ != NULL); | 225 DCHECK(command_buffer_ != NULL); |
| 226 DCHECK(transfer_buffer_.get()); | 226 DCHECK(transfer_buffer_.get()); |
| 227 bool share_resources = share_ctx != NULL; | 227 bool share_resources = share_ctx != NULL; |
| 228 context_.reset(new gpu::gles2::GLES2Implementation( | 228 context_.reset(new gpu::gles2::GLES2Implementation( |
| 229 gles2_cmd_helper_.get(), | 229 gles2_cmd_helper_.get(), |
| 230 NULL, | 230 NULL, |
| 231 transfer_buffer_.get(), | 231 transfer_buffer_.get(), |
| 232 share_resources, | 232 share_resources, |
| 233 true)); | 233 true, |
| 234 NULL)); |
| 234 | 235 |
| 235 if (!context_->Initialize( | 236 if (!context_->Initialize( |
| 236 kTransferBufferSize, | 237 kTransferBufferSize, |
| 237 kTransferBufferSize / 2, | 238 kTransferBufferSize / 2, |
| 238 kTransferBufferSize * 2)) { | 239 kTransferBufferSize * 2)) { |
| 239 return EGL_NO_CONTEXT; | 240 return EGL_NO_CONTEXT; |
| 240 } | 241 } |
| 241 | 242 |
| 242 context_->EnableFeatureCHROMIUM("pepper3d_allow_buffers_on_multiple_targets"); | 243 context_->EnableFeatureCHROMIUM("pepper3d_allow_buffers_on_multiple_targets"); |
| 243 context_->EnableFeatureCHROMIUM("pepper3d_support_fixed_attribs"); | 244 context_->EnableFeatureCHROMIUM("pepper3d_support_fixed_attribs"); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 257 } else { | 258 } else { |
| 258 DCHECK(IsValidSurface(draw)); | 259 DCHECK(IsValidSurface(draw)); |
| 259 DCHECK(IsValidSurface(read)); | 260 DCHECK(IsValidSurface(read)); |
| 260 DCHECK(IsValidContext(ctx)); | 261 DCHECK(IsValidContext(ctx)); |
| 261 gles2::SetGLContext(context_.get()); | 262 gles2::SetGLContext(context_.get()); |
| 262 } | 263 } |
| 263 return true; | 264 return true; |
| 264 } | 265 } |
| 265 | 266 |
| 266 } // namespace egl | 267 } // namespace egl |
| OLD | NEW |