| 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 "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" | 5 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" |
| 6 | 6 |
| 7 #include <GLES2/gl2.h> | 7 #include <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 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 Destroy(); | 455 Destroy(); |
| 456 return false; | 456 return false; |
| 457 } | 457 } |
| 458 | 458 |
| 459 // Create a transfer buffer. | 459 // Create a transfer buffer. |
| 460 transfer_buffer_.reset(new TransferBuffer(gles2_helper_.get())); | 460 transfer_buffer_.reset(new TransferBuffer(gles2_helper_.get())); |
| 461 | 461 |
| 462 // Create the object exposing the OpenGL API. | 462 // Create the object exposing the OpenGL API. |
| 463 gles2_implementation_.reset(new GLES2Implementation( | 463 gles2_implementation_.reset(new GLES2Implementation( |
| 464 gles2_helper_.get(), | 464 gles2_helper_.get(), |
| 465 NULL, | 465 context_group ? context_group->GetImplementation()->share_group() : NULL, |
| 466 transfer_buffer_.get(), | 466 transfer_buffer_.get(), |
| 467 true, | 467 true, |
| 468 false)); | 468 false)); |
| 469 | 469 |
| 470 if (!gles2_implementation_->Initialize( | 470 if (!gles2_implementation_->Initialize( |
| 471 kStartTransferBufferSize, | 471 kStartTransferBufferSize, |
| 472 kMinTransferBufferSize, | 472 kMinTransferBufferSize, |
| 473 kMaxTransferBufferSize)) { | 473 kMaxTransferBufferSize)) { |
| 474 return false; | 474 return false; |
| 475 } | 475 } |
| (...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1601 void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() { | 1601 void WebGraphicsContext3DInProcessCommandBufferImpl::OnContextLost() { |
| 1602 // TODO(kbr): improve the precision here. | 1602 // TODO(kbr): improve the precision here. |
| 1603 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; | 1603 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; |
| 1604 if (context_lost_callback_) { | 1604 if (context_lost_callback_) { |
| 1605 context_lost_callback_->onContextLost(); | 1605 context_lost_callback_->onContextLost(); |
| 1606 } | 1606 } |
| 1607 } | 1607 } |
| 1608 | 1608 |
| 1609 } // namespace gpu | 1609 } // namespace gpu |
| 1610 } // namespace webkit | 1610 } // namespace webkit |
| OLD | NEW |