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 "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" | 5 #include "content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h" |
6 | 6 |
7 #include "third_party/khronos/GLES2/gl2.h" | 7 #include "third_party/khronos/GLES2/gl2.h" |
8 #ifndef GL_GLEXT_PROTOTYPES | 8 #ifndef GL_GLEXT_PROTOTYPES |
9 #define GL_GLEXT_PROTOTYPES 1 | 9 #define GL_GLEXT_PROTOTYPES 1 |
10 #endif | 10 #endif |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 // Create a transfer buffer used to copy resources between the renderer | 262 // Create a transfer buffer used to copy resources between the renderer |
263 // process and the GPU process. | 263 // process and the GPU process. |
264 transfer_buffer_ .reset(new gpu::TransferBuffer(gles2_helper_.get())); | 264 transfer_buffer_ .reset(new gpu::TransferBuffer(gles2_helper_.get())); |
265 | 265 |
266 DCHECK(host_.get()); | 266 DCHECK(host_.get()); |
267 | 267 |
268 // Create the object exposing the OpenGL API. | 268 // Create the object exposing the OpenGL API. |
269 bool bind_generates_resources = false; | 269 bool bind_generates_resources = false; |
270 real_gl_.reset( | 270 real_gl_.reset( |
271 new gpu::gles2::GLES2Implementation(gles2_helper_.get(), | 271 new gpu::gles2::GLES2Implementation(gles2_helper_.get(), |
272 gles2_share_group, | 272 gles2_share_group.get(), |
273 transfer_buffer_.get(), | 273 transfer_buffer_.get(), |
274 bind_generates_resources, | 274 bind_generates_resources, |
275 lose_context_when_out_of_memory_, | 275 lose_context_when_out_of_memory_, |
276 command_buffer_.get())); | 276 command_buffer_.get())); |
277 setGLInterface(real_gl_.get()); | 277 setGLInterface(real_gl_.get()); |
278 | 278 |
279 if (!real_gl_->Initialize( | 279 if (!real_gl_->Initialize( |
280 mem_limits_.start_transfer_buffer_size, | 280 mem_limits_.start_transfer_buffer_size, |
281 mem_limits_.min_transfer_buffer_size, | 281 mem_limits_.min_transfer_buffer_size, |
282 mem_limits_.max_transfer_buffer_size, | 282 mem_limits_.max_transfer_buffer_size, |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 share_group_->RemoveAllContexts(); | 422 share_group_->RemoveAllContexts(); |
423 | 423 |
424 DCHECK(host_.get()); | 424 DCHECK(host_.get()); |
425 { | 425 { |
426 base::AutoLock lock(g_default_share_groups_lock.Get()); | 426 base::AutoLock lock(g_default_share_groups_lock.Get()); |
427 g_default_share_groups.Get().erase(host_.get()); | 427 g_default_share_groups.Get().erase(host_.get()); |
428 } | 428 } |
429 } | 429 } |
430 | 430 |
431 } // namespace content | 431 } // namespace content |
OLD | NEW |