| 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/client/gl_in_process_context.h" | 5 #include "gpu/command_buffer/client/gl_in_process_context.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 LOG(ERROR) << "Failed to initialize GLES2CmdHelper"; | 197 LOG(ERROR) << "Failed to initialize GLES2CmdHelper"; |
| 198 Destroy(); | 198 Destroy(); |
| 199 return false; | 199 return false; |
| 200 } | 200 } |
| 201 | 201 |
| 202 // Create a transfer buffer. | 202 // Create a transfer buffer. |
| 203 transfer_buffer_.reset(new TransferBuffer(gles2_helper_.get())); | 203 transfer_buffer_.reset(new TransferBuffer(gles2_helper_.get())); |
| 204 | 204 |
| 205 // Check for consistency. | 205 // Check for consistency. |
| 206 DCHECK(!attribs.bind_generates_resource); | 206 DCHECK(!attribs.bind_generates_resource); |
| 207 bool bind_generates_resource = false; | 207 const bool bind_generates_resource = false; |
| 208 const bool support_client_side_arrays = false; |
| 208 | 209 |
| 209 // Create the object exposing the OpenGL API. | 210 // Create the object exposing the OpenGL API. |
| 210 gles2_implementation_.reset( | 211 gles2_implementation_.reset( |
| 211 new gles2::GLES2Implementation(gles2_helper_.get(), | 212 new gles2::GLES2Implementation(gles2_helper_.get(), |
| 212 share_group.get(), | 213 share_group.get(), |
| 213 transfer_buffer_.get(), | 214 transfer_buffer_.get(), |
| 214 bind_generates_resource, | 215 bind_generates_resource, |
| 215 attribs.lose_context_when_out_of_memory, | 216 attribs.lose_context_when_out_of_memory, |
| 217 support_client_side_arrays, |
| 216 command_buffer_.get())); | 218 command_buffer_.get())); |
| 217 | 219 |
| 218 if (use_global_share_group) { | 220 if (use_global_share_group) { |
| 219 g_all_shared_contexts.Get().insert(this); | 221 g_all_shared_contexts.Get().insert(this); |
| 220 scoped_shared_context_lock.reset(); | 222 scoped_shared_context_lock.reset(); |
| 221 } | 223 } |
| 222 | 224 |
| 223 if (!gles2_implementation_->Initialize( | 225 if (!gles2_implementation_->Initialize( |
| 224 mem_limits_.start_transfer_buffer_size, | 226 mem_limits_.start_transfer_buffer_size, |
| 225 mem_limits_.min_transfer_buffer_size, | 227 mem_limits_.min_transfer_buffer_size, |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 gpu_preference, | 300 gpu_preference, |
| 299 service, | 301 service, |
| 300 gpu_memory_buffer_manager, | 302 gpu_memory_buffer_manager, |
| 301 image_factory)) | 303 image_factory)) |
| 302 return NULL; | 304 return NULL; |
| 303 | 305 |
| 304 return context.release(); | 306 return context.release(); |
| 305 } | 307 } |
| 306 | 308 |
| 307 } // namespace gpu | 309 } // namespace gpu |
| OLD | NEW |