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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 break; | 447 break; |
448 default: | 448 default: |
449 last_error_ = BAD_ATTRIBUTE; | 449 last_error_ = BAD_ATTRIBUTE; |
450 attribs.push_back(NONE); | 450 attribs.push_back(NONE); |
451 attrib_list = NULL; | 451 attrib_list = NULL; |
452 break; | 452 break; |
453 } | 453 } |
454 } | 454 } |
455 | 455 |
456 command_buffer_.reset(new CommandBufferService); | 456 command_buffer_.reset(new CommandBufferService); |
457 if (!command_buffer_->Initialize(kCommandBufferSize)) { | 457 if (!command_buffer_->Initialize()) { |
458 LOG(ERROR) << "Could not initialize command buffer."; | 458 LOG(ERROR) << "Could not initialize command buffer."; |
459 Destroy(); | 459 Destroy(); |
460 return false; | 460 return false; |
461 } | 461 } |
462 | 462 |
463 // TODO(gman): This needs to be true if this is Pepper. | 463 // TODO(gman): This needs to be true if this is Pepper. |
464 bool bind_generates_resource = false; | 464 bool bind_generates_resource = false; |
465 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group ? | 465 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group ? |
466 context_group->decoder_->GetContextGroup() : | 466 context_group->decoder_->GetContextGroup() : |
467 new ::gpu::gles2::ContextGroup(bind_generates_resource))); | 467 new ::gpu::gles2::ContextGroup(bind_generates_resource))); |
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1672 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; | 1672 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; |
1673 if (context_lost_callback_) { | 1673 if (context_lost_callback_) { |
1674 context_lost_callback_->onContextLost(); | 1674 context_lost_callback_->onContextLost(); |
1675 } | 1675 } |
1676 } | 1676 } |
1677 | 1677 |
1678 } // namespace gpu | 1678 } // namespace gpu |
1679 } // namespace webkit | 1679 } // namespace webkit |
1680 | 1680 |
1681 #endif // defined(ENABLE_GPU) | 1681 #endif // defined(ENABLE_GPU) |
OLD | NEW |