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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 DCHECK(IsValidConfig(config)); | 221 DCHECK(IsValidConfig(config)); |
222 // TODO(alokp): Add support for shared contexts. | 222 // TODO(alokp): Add support for shared contexts. |
223 if (share_ctx != NULL) | 223 if (share_ctx != NULL) |
224 return EGL_NO_CONTEXT; | 224 return EGL_NO_CONTEXT; |
225 | 225 |
226 DCHECK(command_buffer_ != NULL); | 226 DCHECK(command_buffer_ != NULL); |
227 DCHECK(transfer_buffer_.get()); | 227 DCHECK(transfer_buffer_.get()); |
228 | 228 |
229 bool bind_generates_resources = true; | 229 bool bind_generates_resources = true; |
230 bool lose_context_when_out_of_memory = false; | 230 bool lose_context_when_out_of_memory = false; |
| 231 bool support_client_side_arrays = true; |
231 | 232 |
232 context_.reset( | 233 context_.reset( |
233 new gpu::gles2::GLES2Implementation(gles2_cmd_helper_.get(), | 234 new gpu::gles2::GLES2Implementation(gles2_cmd_helper_.get(), |
234 NULL, | 235 NULL, |
235 transfer_buffer_.get(), | 236 transfer_buffer_.get(), |
236 bind_generates_resources, | 237 bind_generates_resources, |
237 lose_context_when_out_of_memory, | 238 lose_context_when_out_of_memory, |
| 239 support_client_side_arrays, |
238 this)); | 240 this)); |
239 | 241 |
240 if (!context_->Initialize( | 242 if (!context_->Initialize( |
241 kTransferBufferSize, | 243 kTransferBufferSize, |
242 kTransferBufferSize / 2, | 244 kTransferBufferSize / 2, |
243 kTransferBufferSize * 2, | 245 kTransferBufferSize * 2, |
244 gpu::gles2::GLES2Implementation::kNoLimit)) { | 246 gpu::gles2::GLES2Implementation::kNoLimit)) { |
245 return EGL_NO_CONTEXT; | 247 return EGL_NO_CONTEXT; |
246 } | 248 } |
247 | 249 |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 void Display::SetSurfaceVisible(bool visible) { | 321 void Display::SetSurfaceVisible(bool visible) { |
320 NOTIMPLEMENTED(); | 322 NOTIMPLEMENTED(); |
321 } | 323 } |
322 | 324 |
323 uint32 Display::CreateStreamTexture(uint32 texture_id) { | 325 uint32 Display::CreateStreamTexture(uint32 texture_id) { |
324 NOTIMPLEMENTED(); | 326 NOTIMPLEMENTED(); |
325 return 0; | 327 return 0; |
326 } | 328 } |
327 | 329 |
328 } // namespace egl | 330 } // namespace egl |
OLD | NEW |