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

Side by Side Diff: content/browser/gpu/gpu_process_host.cc

Issue 12252058: Add a |scope| argument to TRACE_EVENT_INSTANT* and require its presence. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use flags to record scope Created 7 years, 10 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/browser/gpu/gpu_process_host.h" 5 #include "content/browser/gpu/gpu_process_host.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 BlockLiveOffscreenContexts(); 467 BlockLiveOffscreenContexts();
468 468
469 BrowserThread::PostTask(BrowserThread::UI, 469 BrowserThread::PostTask(BrowserThread::UI,
470 FROM_HERE, 470 FROM_HERE,
471 base::Bind(&GpuProcessHostUIShim::Destroy, host_id_)); 471 base::Bind(&GpuProcessHostUIShim::Destroy, host_id_));
472 } 472 }
473 473
474 bool GpuProcessHost::Init() { 474 bool GpuProcessHost::Init() {
475 init_start_time_ = base::TimeTicks::Now(); 475 init_start_time_ = base::TimeTicks::Now();
476 476
477 TRACE_EVENT_INSTANT0("gpu", "LaunchGpuProcess"); 477 TRACE_EVENT_INSTANT0("gpu", "LaunchGpuProcess", TRACE_EVENT_SCOPE_THREAD);
478 478
479 std::string channel_id = process_->GetHost()->CreateChannel(); 479 std::string channel_id = process_->GetHost()->CreateChannel();
480 if (channel_id.empty()) 480 if (channel_id.empty())
481 return false; 481 return false;
482 482
483 if (in_process_) { 483 if (in_process_) {
484 CommandLine::ForCurrentProcess()->AppendSwitch( 484 CommandLine::ForCurrentProcess()->AppendSwitch(
485 switches::kDisableGpuWatchdog); 485 switches::kDisableGpuWatchdog);
486 486
487 in_process_gpu_thread_.reset(new GpuMainThread(channel_id)); 487 in_process_gpu_thread_.reset(new GpuMainThread(channel_id));
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 void GpuProcessHost::BlockLiveOffscreenContexts() { 1058 void GpuProcessHost::BlockLiveOffscreenContexts() {
1059 for (std::multiset<GURL>::iterator iter = 1059 for (std::multiset<GURL>::iterator iter =
1060 urls_with_live_offscreen_contexts_.begin(); 1060 urls_with_live_offscreen_contexts_.begin();
1061 iter != urls_with_live_offscreen_contexts_.end(); ++iter) { 1061 iter != urls_with_live_offscreen_contexts_.end(); ++iter) {
1062 GpuDataManagerImpl::GetInstance()->BlockDomainFrom3DAPIs( 1062 GpuDataManagerImpl::GetInstance()->BlockDomainFrom3DAPIs(
1063 *iter, GpuDataManagerImpl::DOMAIN_GUILT_UNKNOWN); 1063 *iter, GpuDataManagerImpl::DOMAIN_GUILT_UNKNOWN);
1064 } 1064 }
1065 } 1065 }
1066 1066
1067 } // namespace content 1067 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698