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

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

Issue 9837124: Add ShareGroup to GLES2Implemenation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 | « no previous file | gpu/command_buffer/client/gles2_implementation.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/content_gl_context.h" 5 #include "content/common/gpu/client/content_gl_context.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/debug/trace_event.h" 8 #include "base/debug/trace_event.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 { 413 {
414 TRACE_EVENT0("gpu", "ContentGLContext::Initialize::CreateTransferBuffer"); 414 TRACE_EVENT0("gpu", "ContentGLContext::Initialize::CreateTransferBuffer");
415 // Create a transfer buffer used to copy resources between the renderer 415 // Create a transfer buffer used to copy resources between the renderer
416 // process and the GPU process. 416 // process and the GPU process.
417 transfer_buffer_ = new gpu::TransferBuffer(gles2_helper_); 417 transfer_buffer_ = new gpu::TransferBuffer(gles2_helper_);
418 } 418 }
419 419
420 // Create the object exposing the OpenGL API. 420 // Create the object exposing the OpenGL API.
421 gles2_implementation_ = new gpu::gles2::GLES2Implementation( 421 gles2_implementation_ = new gpu::gles2::GLES2Implementation(
422 gles2_helper_, 422 gles2_helper_,
423 NULL,
423 transfer_buffer_, 424 transfer_buffer_,
424 share_resources, 425 share_resources,
425 bind_generates_resources); 426 bind_generates_resources);
426 427
427 if (!gles2_implementation_->Initialize( 428 if (!gles2_implementation_->Initialize(
428 kStartTransferBufferSize, 429 kStartTransferBufferSize,
429 kMinTransferBufferSize, 430 kMinTransferBufferSize,
430 kMaxTransferBufferSize)) { 431 kMaxTransferBufferSize)) {
431 Destroy(); 432 Destroy();
432 return false; 433 return false;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 void ContentGLContext::OnContextLost() { 472 void ContentGLContext::OnContextLost() {
472 if (!context_lost_callback_.is_null()) { 473 if (!context_lost_callback_.is_null()) {
473 ContentGLContext::ContextLostReason reason = kUnknown; 474 ContentGLContext::ContextLostReason reason = kUnknown;
474 if (command_buffer_) { 475 if (command_buffer_) {
475 reason = ConvertReason( 476 reason = ConvertReason(
476 command_buffer_->GetLastState().context_lost_reason); 477 command_buffer_->GetLastState().context_lost_reason);
477 } 478 }
478 context_lost_callback_.Run(reason); 479 context_lost_callback_.Run(reason);
479 } 480 }
480 } 481 }
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698