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

Side by Side Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 10441140: Make context groups share a TextureBufferManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 #if defined(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 Destroy(); 232 Destroy();
233 GpuCommandBufferMsg_Initialize::WriteReplyParams(reply_message, false); 233 GpuCommandBufferMsg_Initialize::WriteReplyParams(reply_message, false);
234 Send(reply_message); 234 Send(reply_message);
235 } 235 }
236 236
237 void GpuCommandBufferStub::OnInitialize( 237 void GpuCommandBufferStub::OnInitialize(
238 IPC::Message* reply_message) { 238 IPC::Message* reply_message) {
239 TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnInitialize"); 239 TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnInitialize");
240 DCHECK(!command_buffer_.get()); 240 DCHECK(!command_buffer_.get());
241 241
242 command_buffer_.reset(new gpu::CommandBufferService); 242 command_buffer_.reset(new gpu::CommandBufferService(
243 context_group_->transfer_buffer_manager()));
243 244
244 if (!command_buffer_->Initialize()) { 245 if (!command_buffer_->Initialize()) {
245 DLOG(ERROR) << "CommandBufferService failed to initialize.\n"; 246 DLOG(ERROR) << "CommandBufferService failed to initialize.\n";
246 OnInitializeFailed(reply_message); 247 OnInitializeFailed(reply_message);
247 return; 248 return;
248 } 249 }
249 250
250 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group_.get())); 251 decoder_.reset(::gpu::gles2::GLES2Decoder::Create(context_group_.get()));
251 252
252 scheduler_.reset(new gpu::GpuScheduler(command_buffer_.get(), 253 scheduler_.reset(new gpu::GpuScheduler(command_buffer_.get(),
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 668
668 void GpuCommandBufferStub::SetMemoryAllocation( 669 void GpuCommandBufferStub::SetMemoryAllocation(
669 const GpuMemoryAllocation& allocation) { 670 const GpuMemoryAllocation& allocation) {
670 Send(new GpuCommandBufferMsg_SetMemoryAllocation(route_id_, allocation)); 671 Send(new GpuCommandBufferMsg_SetMemoryAllocation(route_id_, allocation));
671 if (!surface_) 672 if (!surface_)
672 return; 673 return;
673 surface_->SetFrontbufferAllocation(allocation.suggest_have_frontbuffer); 674 surface_->SetFrontbufferAllocation(allocation.suggest_have_frontbuffer);
674 } 675 }
675 676
676 #endif // defined(ENABLE_GPU) 677 #endif // defined(ENABLE_GPU)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698