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

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: 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 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 g_all_shared_contexts.Pointer()->empty() ? 458 g_all_shared_contexts.Pointer()->empty() ?
459 NULL : *g_all_shared_contexts.Pointer()->begin(); 459 NULL : *g_all_shared_contexts.Pointer()->begin();
460 460
461 // Create the object exposing the OpenGL API. 461 // Create the object exposing the OpenGL API.
462 real_gl_.reset(new gpu::gles2::GLES2Implementation( 462 real_gl_.reset(new gpu::gles2::GLES2Implementation(
463 gles2_helper_.get(), 463 gles2_helper_.get(),
464 share_group_context ? 464 share_group_context ?
465 share_group_context->GetImplementation()->share_group() : NULL, 465 share_group_context->GetImplementation()->share_group() : NULL,
466 transfer_buffer_.get(), 466 transfer_buffer_.get(),
467 attributes_.shareResources, 467 attributes_.shareResources,
468 bind_generates_resources_, 468 bind_generates_resources_));
469 NULL));
470 gl_ = real_gl_.get(); 469 gl_ = real_gl_.get();
471 470
472 if (!real_gl_->Initialize( 471 if (!real_gl_->Initialize(
473 start_transfer_buffer_size_, 472 start_transfer_buffer_size_,
474 min_transfer_buffer_size_, 473 min_transfer_buffer_size_,
475 max_transfer_buffer_size_)) { 474 max_transfer_buffer_size_)) {
476 return false; 475 return false;
477 } 476 }
478 477
479 if (CommandLine::ForCurrentProcess()->HasSwitch( 478 if (CommandLine::ForCurrentProcess()->HasSwitch(
(...skipping 1098 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 1577
1579 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage( 1578 void WebGraphicsContext3DCommandBufferImpl::OnErrorMessage(
1580 const std::string& message, int id) { 1579 const std::string& message, int id) {
1581 if (error_message_callback_) { 1580 if (error_message_callback_) {
1582 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str()); 1581 WebKit::WebString str = WebKit::WebString::fromUTF8(message.c_str());
1583 error_message_callback_->onErrorMessage(str, id); 1582 error_message_callback_->onErrorMessage(str, id);
1584 } 1583 }
1585 } 1584 }
1586 1585
1587 } // namespace content 1586 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698