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/command_buffer/tests/gl_manager.h" | 5 #include "gpu/command_buffer/tests/gl_manager.h" |
6 | 6 |
7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
8 #include <GLES2/gl2ext.h> | 8 #include <GLES2/gl2ext.h> |
9 #include <GLES2/gl2extchromium.h> | 9 #include <GLES2/gl2extchromium.h> |
10 | 10 |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 base::Bind(&GLManager::GetBufferChanged, base::Unretained(this))); | 248 base::Bind(&GLManager::GetBufferChanged, base::Unretained(this))); |
249 | 249 |
250 // Create the GLES2 helper, which writes the command buffer protocol. | 250 // Create the GLES2 helper, which writes the command buffer protocol. |
251 gles2_helper_.reset(new gles2::GLES2CmdHelper(command_buffer_.get())); | 251 gles2_helper_.reset(new gles2::GLES2CmdHelper(command_buffer_.get())); |
252 ASSERT_TRUE(gles2_helper_->Initialize(kCommandBufferSize)); | 252 ASSERT_TRUE(gles2_helper_->Initialize(kCommandBufferSize)); |
253 | 253 |
254 // Create a transfer buffer. | 254 // Create a transfer buffer. |
255 transfer_buffer_.reset(new TransferBuffer(gles2_helper_.get())); | 255 transfer_buffer_.reset(new TransferBuffer(gles2_helper_.get())); |
256 | 256 |
257 // Create the object exposing the OpenGL API. | 257 // Create the object exposing the OpenGL API. |
| 258 const bool support_client_side_arrays = true; |
258 gles2_implementation_.reset( | 259 gles2_implementation_.reset( |
259 new gles2::GLES2Implementation(gles2_helper_.get(), | 260 new gles2::GLES2Implementation(gles2_helper_.get(), |
260 client_share_group, | 261 client_share_group, |
261 transfer_buffer_.get(), | 262 transfer_buffer_.get(), |
262 options.bind_generates_resource, | 263 options.bind_generates_resource, |
263 options.lose_context_when_out_of_memory, | 264 options.lose_context_when_out_of_memory, |
| 265 support_client_side_arrays, |
264 this)); | 266 this)); |
265 | 267 |
266 ASSERT_TRUE(gles2_implementation_->Initialize( | 268 ASSERT_TRUE(gles2_implementation_->Initialize( |
267 kStartTransferBufferSize, | 269 kStartTransferBufferSize, |
268 kMinTransferBufferSize, | 270 kMinTransferBufferSize, |
269 kMaxTransferBufferSize, | 271 kMaxTransferBufferSize, |
270 gpu::gles2::GLES2Implementation::kNoLimit)) | 272 gpu::gles2::GLES2Implementation::kNoLimit)) |
271 << "Could not init GLES2Implementation"; | 273 << "Could not init GLES2Implementation"; |
272 | 274 |
273 MakeCurrent(); | 275 MakeCurrent(); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 void GLManager::SetSurfaceVisible(bool visible) { | 405 void GLManager::SetSurfaceVisible(bool visible) { |
404 NOTIMPLEMENTED(); | 406 NOTIMPLEMENTED(); |
405 } | 407 } |
406 | 408 |
407 uint32 GLManager::CreateStreamTexture(uint32 texture_id) { | 409 uint32 GLManager::CreateStreamTexture(uint32 texture_id) { |
408 NOTIMPLEMENTED(); | 410 NOTIMPLEMENTED(); |
409 return 0; | 411 return 0; |
410 } | 412 } |
411 | 413 |
412 } // namespace gpu | 414 } // namespace gpu |
OLD | NEW |