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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 } | 414 } |
415 | 415 |
416 bool WebGraphicsContext3DCommandBufferImpl::setParentContext( | 416 bool WebGraphicsContext3DCommandBufferImpl::setParentContext( |
417 WebGraphicsContext3D* parent_context) { | 417 WebGraphicsContext3D* parent_context) { |
418 WebGraphicsContext3DCommandBufferImpl* parent_context_impl = | 418 WebGraphicsContext3DCommandBufferImpl* parent_context_impl = |
419 static_cast<WebGraphicsContext3DCommandBufferImpl*>(parent_context); | 419 static_cast<WebGraphicsContext3DCommandBufferImpl*>(parent_context); |
420 return SetParent(parent_context_impl); | 420 return SetParent(parent_context_impl); |
421 } | 421 } |
422 | 422 |
423 unsigned int WebGraphicsContext3DCommandBufferImpl::insertSyncPoint() { | 423 unsigned int WebGraphicsContext3DCommandBufferImpl::insertSyncPoint() { |
424 real_gl_->helper()->CommandBufferHelper::Flush(); | 424 return gl_->InsertSyncPointCHROMIUM(); |
425 return command_buffer_->InsertSyncPoint(); | |
426 } | 425 } |
427 | 426 |
428 bool WebGraphicsContext3DCommandBufferImpl::SetParent( | 427 bool WebGraphicsContext3DCommandBufferImpl::SetParent( |
429 WebGraphicsContext3DCommandBufferImpl* new_parent) { | 428 WebGraphicsContext3DCommandBufferImpl* new_parent) { |
430 if (parent_ == new_parent) | 429 if (parent_ == new_parent) |
431 return true; | 430 return true; |
432 | 431 |
433 // Allocate a texture ID with respect to the parent and change the parent. | 432 // Allocate a texture ID with respect to the parent and change the parent. |
434 uint32 new_parent_texture_id = 0; | 433 uint32 new_parent_texture_id = 0; |
435 if (command_buffer_) { | 434 if (command_buffer_) { |
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1740 | 1739 |
1741 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( | 1740 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( |
1742 const std::string& message, int id) { | 1741 const std::string& message, int id) { |
1743 if (error_message_callback_) { | 1742 if (error_message_callback_) { |
1744 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); | 1743 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); |
1745 error_message_callback_->onErrorMessage(str, id); | 1744 error_message_callback_->onErrorMessage(str, id); |
1746 } | 1745 } |
1747 } | 1746 } |
1748 | 1747 |
1749 } // namespace content | 1748 } // namespace content |
OLD | NEW |