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

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

Issue 565833002: Refactoring the weak_ptr_factory order in src/content/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « content/common/gpu/gpu_channel.h ('k') | content/common/gpu/gpu_channel_manager.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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 bool allow_future_sync_points) 403 bool allow_future_sync_points)
404 : gpu_channel_manager_(gpu_channel_manager), 404 : gpu_channel_manager_(gpu_channel_manager),
405 messages_processed_(0), 405 messages_processed_(0),
406 client_id_(client_id), 406 client_id_(client_id),
407 share_group_(share_group ? share_group : new gfx::GLShareGroup), 407 share_group_(share_group ? share_group : new gfx::GLShareGroup),
408 mailbox_manager_(mailbox ? mailbox : new gpu::gles2::MailboxManager), 408 mailbox_manager_(mailbox ? mailbox : new gpu::gles2::MailboxManager),
409 watchdog_(watchdog), 409 watchdog_(watchdog),
410 software_(software), 410 software_(software),
411 handle_messages_scheduled_(false), 411 handle_messages_scheduled_(false),
412 currently_processing_message_(NULL), 412 currently_processing_message_(NULL),
413 weak_factory_(this),
414 num_stubs_descheduled_(0), 413 num_stubs_descheduled_(0),
415 allow_future_sync_points_(allow_future_sync_points) { 414 allow_future_sync_points_(allow_future_sync_points),
415 weak_factory_(this) {
416 DCHECK(gpu_channel_manager); 416 DCHECK(gpu_channel_manager);
417 DCHECK(client_id); 417 DCHECK(client_id);
418 418
419 channel_id_ = IPC::Channel::GenerateVerifiedChannelID("gpu"); 419 channel_id_ = IPC::Channel::GenerateVerifiedChannelID("gpu");
420 const base::CommandLine* command_line = 420 const base::CommandLine* command_line =
421 base::CommandLine::ForCurrentProcess(); 421 base::CommandLine::ForCurrentProcess();
422 log_messages_ = command_line->HasSwitch(switches::kLogPluginMessages); 422 log_messages_ = command_line->HasSwitch(switches::kLogPluginMessages);
423 } 423 }
424 424
425 GpuChannel::~GpuChannel() { 425 GpuChannel::~GpuChannel() {
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 uint64 GpuChannel::GetMemoryUsage() { 886 uint64 GpuChannel::GetMemoryUsage() {
887 uint64 size = 0; 887 uint64 size = 0;
888 for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_); 888 for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_);
889 !it.IsAtEnd(); it.Advance()) { 889 !it.IsAtEnd(); it.Advance()) {
890 size += it.GetCurrentValue()->GetMemoryUsage(); 890 size += it.GetCurrentValue()->GetMemoryUsage();
891 } 891 }
892 return size; 892 return size;
893 } 893 }
894 894
895 } // namespace content 895 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel.h ('k') | content/common/gpu/gpu_channel_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698