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

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

Issue 1031133003: favor DCHECK_CURRENTLY_ON for better logs in content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
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/base64.h" 7 #include "base/base64.h"
8 #include "base/base_switches.h" 8 #include "base/base_switches.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 bool GpuProcessHost::Init() { 497 bool GpuProcessHost::Init() {
498 init_start_time_ = base::TimeTicks::Now(); 498 init_start_time_ = base::TimeTicks::Now();
499 499
500 TRACE_EVENT_INSTANT0("gpu", "LaunchGpuProcess", TRACE_EVENT_SCOPE_THREAD); 500 TRACE_EVENT_INSTANT0("gpu", "LaunchGpuProcess", TRACE_EVENT_SCOPE_THREAD);
501 501
502 std::string channel_id = process_->GetHost()->CreateChannel(); 502 std::string channel_id = process_->GetHost()->CreateChannel();
503 if (channel_id.empty()) 503 if (channel_id.empty())
504 return false; 504 return false;
505 505
506 if (in_process_) { 506 if (in_process_) {
507 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 507 DCHECK_CURRENTLY_ON(BrowserThread::IO);
508 DCHECK(g_gpu_main_thread_factory); 508 DCHECK(g_gpu_main_thread_factory);
509 in_process_gpu_thread_.reset( 509 in_process_gpu_thread_.reset(
510 g_gpu_main_thread_factory(InProcessChildThreadParams( 510 g_gpu_main_thread_factory(InProcessChildThreadParams(
511 channel_id, base::MessageLoop::current()->task_runner()))); 511 channel_id, base::MessageLoop::current()->task_runner())));
512 base::Thread::Options options; 512 base::Thread::Options options;
513 #if defined(OS_WIN) 513 #if defined(OS_WIN)
514 // WGL needs to create its own window and pump messages on it. 514 // WGL needs to create its own window and pump messages on it.
515 options.message_loop_type = base::MessageLoop::TYPE_UI; 515 options.message_loop_type = base::MessageLoop::TYPE_UI;
516 #endif 516 #endif
517 in_process_gpu_thread_->StartWithOptions(options); 517 in_process_gpu_thread_->StartWithOptions(options);
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); 1090 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader");
1091 ClientIdToShaderCacheMap::iterator iter = 1091 ClientIdToShaderCacheMap::iterator iter =
1092 client_id_to_shader_cache_.find(client_id); 1092 client_id_to_shader_cache_.find(client_id);
1093 // If the cache doesn't exist then this is an off the record profile. 1093 // If the cache doesn't exist then this is an off the record profile.
1094 if (iter == client_id_to_shader_cache_.end()) 1094 if (iter == client_id_to_shader_cache_.end())
1095 return; 1095 return;
1096 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); 1096 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader);
1097 } 1097 }
1098 1098
1099 } // namespace content 1099 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/frame_tree_node.cc ('k') | content/browser/media/capture/aura_window_capture_machine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698