Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc

Issue 12581004: Move InsertSyncPoint to GLES2Interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/common/gpu/client/command_buffer_proxy_impl.h ('k') | gpu/GLES2/gl2chromium_autogen.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/common/gpu/client/command_buffer_proxy_impl.h ('k') | gpu/GLES2/gl2chromium_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698