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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 break; | 450 break; |
451 default: | 451 default: |
452 last_error_ = BAD_ATTRIBUTE; | 452 last_error_ = BAD_ATTRIBUTE; |
453 attribs.push_back(NONE); | 453 attribs.push_back(NONE); |
454 attrib_list = NULL; | 454 attrib_list = NULL; |
455 break; | 455 break; |
456 } | 456 } |
457 } | 457 } |
458 | 458 |
459 command_buffer_.reset(new CommandBufferService); | 459 command_buffer_.reset(new CommandBufferService); |
460 if (!command_buffer_->Initialize(kCommandBufferSize)) { | 460 if (!command_buffer_->Initialize()) { |
461 LOG(ERROR) << "Could not initialize command buffer."; | 461 LOG(ERROR) << "Could not initialize command buffer."; |
462 Destroy(); | 462 Destroy(); |
463 return false; | 463 return false; |
464 } | 464 } |
465 | 465 |
466 // TODO(gman): This needs to be true if this is Pepper. | 466 // TODO(gman): This needs to be true if this is Pepper. |
467 bool bind_generates_resource = false; | 467 bool bind_generates_resource = false; |
468 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group ? | 468 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group ? |
469 context_group->decoder_->GetContextGroup() : | 469 context_group->decoder_->GetContextGroup() : |
470 new ::gpu::gles2::ContextGroup(bind_generates_resource))); | 470 new ::gpu::gles2::ContextGroup(bind_generates_resource))); |
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1681 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; | 1681 context_lost_reason_ = GL_UNKNOWN_CONTEXT_RESET_ARB; |
1682 if (context_lost_callback_) { | 1682 if (context_lost_callback_) { |
1683 context_lost_callback_->onContextLost(); | 1683 context_lost_callback_->onContextLost(); |
1684 } | 1684 } |
1685 } | 1685 } |
1686 | 1686 |
1687 } // namespace gpu | 1687 } // namespace gpu |
1688 } // namespace webkit | 1688 } // namespace webkit |
1689 | 1689 |
1690 #endif // defined(ENABLE_GPU) | 1690 #endif // defined(ENABLE_GPU) |
OLD | NEW |