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

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

Issue 310853003: Add IPC::ChannelProxy::Create() and IPC::SyncChannel::Create() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Landing Created 6 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
« no previous file with comments | « content/common/gpu/client/gpu_channel_host.cc ('k') | ipc/ipc_channel_proxy.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 #if defined(OS_WIN) 5 #if defined(OS_WIN)
6 #include <windows.h> 6 #include <windows.h>
7 #endif 7 #endif
8 8
9 #include "content/common/gpu/gpu_channel.h" 9 #include "content/common/gpu/gpu_channel.h"
10 10
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 STLDeleteElements(&deferred_messages_); 404 STLDeleteElements(&deferred_messages_);
405 if (preempting_flag_.get()) 405 if (preempting_flag_.get())
406 preempting_flag_->Reset(); 406 preempting_flag_->Reset();
407 } 407 }
408 408
409 void GpuChannel::Init(base::MessageLoopProxy* io_message_loop, 409 void GpuChannel::Init(base::MessageLoopProxy* io_message_loop,
410 base::WaitableEvent* shutdown_event) { 410 base::WaitableEvent* shutdown_event) {
411 DCHECK(!channel_.get()); 411 DCHECK(!channel_.get());
412 412
413 // Map renderer ID to a (single) channel to that process. 413 // Map renderer ID to a (single) channel to that process.
414 channel_.reset(new IPC::SyncChannel( 414 channel_ = IPC::SyncChannel::Create(channel_id_,
415 channel_id_, 415 IPC::Channel::MODE_SERVER,
416 IPC::Channel::MODE_SERVER, 416 this,
417 this, 417 io_message_loop,
418 io_message_loop, 418 false,
419 false, 419 shutdown_event);
420 shutdown_event));
421 420
422 filter_ = 421 filter_ =
423 new GpuChannelMessageFilter(weak_factory_.GetWeakPtr(), 422 new GpuChannelMessageFilter(weak_factory_.GetWeakPtr(),
424 gpu_channel_manager_->sync_point_manager(), 423 gpu_channel_manager_->sync_point_manager(),
425 base::MessageLoopProxy::current()); 424 base::MessageLoopProxy::current());
426 io_message_loop_ = io_message_loop; 425 io_message_loop_ = io_message_loop;
427 channel_->AddFilter(filter_.get()); 426 channel_->AddFilter(filter_.get());
428 427
429 devtools_gpu_agent_.reset(new DevToolsGpuAgent(this)); 428 devtools_gpu_agent_.reset(new DevToolsGpuAgent(this));
430 } 429 }
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 uint64 GpuChannel::GetMemoryUsage() { 836 uint64 GpuChannel::GetMemoryUsage() {
838 uint64 size = 0; 837 uint64 size = 0;
839 for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_); 838 for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_);
840 !it.IsAtEnd(); it.Advance()) { 839 !it.IsAtEnd(); it.Advance()) {
841 size += it.GetCurrentValue()->GetMemoryUsage(); 840 size += it.GetCurrentValue()->GetMemoryUsage();
842 } 841 }
843 return size; 842 return size;
844 } 843 }
845 844
846 } // namespace content 845 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/gpu_channel_host.cc ('k') | ipc/ipc_channel_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698