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

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

Issue 20017005: gpu: Refactor GpuMemoryBuffer framework for multi-process support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add GpuControl interface Created 7 years, 4 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
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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 DCHECK(share_group); 461 DCHECK(share_group);
462 } 462 }
463 } 463 }
464 464
465 // Create the object exposing the OpenGL API. 465 // Create the object exposing the OpenGL API.
466 real_gl_.reset(new gpu::gles2::GLES2Implementation( 466 real_gl_.reset(new gpu::gles2::GLES2Implementation(
467 gles2_helper_.get(), 467 gles2_helper_.get(),
468 share_group, 468 share_group,
469 transfer_buffer_.get(), 469 transfer_buffer_.get(),
470 bind_generates_resources_, 470 bind_generates_resources_,
471 NULL)); 471 command_buffer_.get()));
472 gl_ = real_gl_.get(); 472 gl_ = real_gl_.get();
473 473
474 if (attributes_.shareResources) { 474 if (attributes_.shareResources) {
475 // Don't add ourselves to the list before others can get to our ShareGroup. 475 // Don't add ourselves to the list before others can get to our ShareGroup.
476 g_all_shared_contexts.Pointer()->insert(this); 476 g_all_shared_contexts.Pointer()->insert(this);
477 lock.reset(); 477 lock.reset();
478 } 478 }
479 479
480 if (!real_gl_->Initialize( 480 if (!real_gl_->Initialize(
481 start_transfer_buffer_size_, 481 start_transfer_buffer_size_,
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after
1586 1586
1587 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1587 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1588 const std::string& message, int id) { 1588 const std::string& message, int id) {
1589 if (error_message_callback_) { 1589 if (error_message_callback_) {
1590 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); 1590 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str());
1591 error_message_callback_->onErrorMessage(str, id); 1591 error_message_callback_->onErrorMessage(str, id);
1592 } 1592 }
1593 } 1593 }
1594 1594
1595 } // namespace content 1595 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698