| 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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 ->GetImplementation()->share_group(); | 460 ->GetImplementation()->share_group(); |
| 461 DCHECK(share_group); | 461 DCHECK(share_group); |
| 462 } | 462 } |
| 463 } | 463 } |
| 464 | 464 |
| 465 // Create the object exposing the OpenGL API. | 465 // Create the object exposing the OpenGL API. |
| 466 real_gl_.reset(new gpu::gles2::GLES2Implementation( | 466 real_gl_.reset(new gpu::gles2::GLES2Implementation( |
| 467 gles2_helper_.get(), | 467 gles2_helper_.get(), |
| 468 share_group, | 468 share_group, |
| 469 transfer_buffer_.get(), | 469 transfer_buffer_.get(), |
| 470 bind_generates_resources_, | 470 bind_generates_resources_)); |
| 471 NULL)); | |
| 472 gl_ = real_gl_.get(); | 471 gl_ = real_gl_.get(); |
| 473 | 472 |
| 474 if (attributes_.shareResources) { | 473 if (attributes_.shareResources) { |
| 475 // Don't add ourselves to the list before others can get to our ShareGroup. | 474 // Don't add ourselves to the list before others can get to our ShareGroup. |
| 476 g_all_shared_contexts.Pointer()->insert(this); | 475 g_all_shared_contexts.Pointer()->insert(this); |
| 477 lock.reset(); | 476 lock.reset(); |
| 478 } | 477 } |
| 479 | 478 |
| 480 if (!real_gl_->Initialize( | 479 if (!real_gl_->Initialize( |
| 481 start_transfer_buffer_size_, | 480 start_transfer_buffer_size_, |
| (...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1586 | 1585 |
| 1587 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( | 1586 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( |
| 1588 const std::string& message, int id) { | 1587 const std::string& message, int id) { |
| 1589 if (error_message_callback_) { | 1588 if (error_message_callback_) { |
| 1590 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); | 1589 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); |
| 1591 error_message_callback_->onErrorMessage(str, id); | 1590 error_message_callback_->onErrorMessage(str, id); |
| 1592 } | 1591 } |
| 1593 } | 1592 } |
| 1594 | 1593 |
| 1595 } // namespace content | 1594 } // namespace content |
| OLD | NEW |