| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #if defined(ENABLE_GPU) | 5 #if defined(ENABLE_GPU) |
| 6 | 6 |
| 7 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" | 7 #include "webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h" |
| 8 | 8 |
| 9 #include <GLES2/gl2.h> | 9 #include <GLES2/gl2.h> |
| 10 #ifndef GL_GLEXT_PROTOTYPES | 10 #ifndef GL_GLEXT_PROTOTYPES |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 context_ = gfx::GLContext::CreateGLContext(share_group.get(), surface_.get()); | 471 context_ = gfx::GLContext::CreateGLContext(share_group.get(), surface_.get()); |
| 472 if (!context_.get()) { | 472 if (!context_.get()) { |
| 473 LOG(ERROR) << "Could not create GLContext."; | 473 LOG(ERROR) << "Could not create GLContext."; |
| 474 Destroy(); | 474 Destroy(); |
| 475 return false; | 475 return false; |
| 476 } | 476 } |
| 477 | 477 |
| 478 if (!decoder_->Initialize(surface_.get(), | 478 if (!decoder_->Initialize(surface_.get(), |
| 479 context_.get(), | 479 context_.get(), |
| 480 size, | 480 size, |
| 481 ::gpu::gles2::DisallowedExtensions(), | 481 ::gpu::gles2::DisallowedFeatures(), |
| 482 allowed_extensions, | 482 allowed_extensions, |
| 483 attribs)) { | 483 attribs)) { |
| 484 LOG(ERROR) << "Could not initialize decoder."; | 484 LOG(ERROR) << "Could not initialize decoder."; |
| 485 Destroy(); | 485 Destroy(); |
| 486 return false; | 486 return false; |
| 487 } | 487 } |
| 488 | 488 |
| 489 if (!decoder_->SetParent( | 489 if (!decoder_->SetParent( |
| 490 parent_.get() ? parent_->decoder_.get() : NULL, | 490 parent_.get() ? parent_->decoder_.get() : NULL, |
| 491 parent_texture_id_)) { | 491 parent_texture_id_)) { |
| (...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1601 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; | 1601 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; |
| 1602 if (context_lost_callback_) { | 1602 if (context_lost_callback_) { |
| 1603 context_lost_callback_->onContextLost(); | 1603 context_lost_callback_->onContextLost(); |
| 1604 } | 1604 } |
| 1605 } | 1605 } |
| 1606 | 1606 |
| 1607 } // namespace gpu | 1607 } // namespace gpu |
| 1608 } // namespace webkit | 1608 } // namespace webkit |
| 1609 | 1609 |
| 1610 #endif // defined(ENABLE_GPU) | 1610 #endif // defined(ENABLE_GPU) |
| OLD | NEW |