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

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

Issue 865063002: Call AppendGpuCommandLine for sync compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gpu only Created 5 years, 11 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/browser/gpu/gpu_data_manager_impl_private.cc ('k') | no next file » | 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 #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 init_start_time_ = base::TimeTicks::Now(); 497 init_start_time_ = base::TimeTicks::Now();
498 498
499 TRACE_EVENT_INSTANT0("gpu", "LaunchGpuProcess", TRACE_EVENT_SCOPE_THREAD); 499 TRACE_EVENT_INSTANT0("gpu", "LaunchGpuProcess", TRACE_EVENT_SCOPE_THREAD);
500 500
501 std::string channel_id = process_->GetHost()->CreateChannel(); 501 std::string channel_id = process_->GetHost()->CreateChannel();
502 if (channel_id.empty()) 502 if (channel_id.empty())
503 return false; 503 return false;
504 504
505 if (in_process_) { 505 if (in_process_) {
506 DCHECK(g_gpu_main_thread_factory); 506 DCHECK(g_gpu_main_thread_factory);
507 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
508 command_line->AppendSwitch(switches::kDisableGpuWatchdog);
509
510 GpuDataManagerImpl* gpu_data_manager = GpuDataManagerImpl::GetInstance();
511 DCHECK(gpu_data_manager);
512 gpu_data_manager->AppendGpuCommandLine(command_line);
513
514 in_process_gpu_thread_.reset(g_gpu_main_thread_factory(channel_id)); 507 in_process_gpu_thread_.reset(g_gpu_main_thread_factory(channel_id));
515 base::Thread::Options options; 508 base::Thread::Options options;
516 #if defined(OS_WIN) 509 #if defined(OS_WIN)
517 // WGL needs to create its own window and pump messages on it. 510 // WGL needs to create its own window and pump messages on it.
518 options.message_loop_type = base::MessageLoop::TYPE_UI; 511 options.message_loop_type = base::MessageLoop::TYPE_UI;
519 #endif 512 #endif
520 in_process_gpu_thread_->StartWithOptions(options); 513 in_process_gpu_thread_->StartWithOptions(options);
521 514
522 OnProcessLaunched(); // Fake a callback that the process is ready. 515 OnProcessLaunched(); // Fake a callback that the process is ready.
523 } else if (!LaunchGpuProcess(channel_id)) { 516 } else if (!LaunchGpuProcess(channel_id)) {
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader"); 1078 TRACE_EVENT0("gpu", "GpuProcessHost::OnCacheShader");
1086 ClientIdToShaderCacheMap::iterator iter = 1079 ClientIdToShaderCacheMap::iterator iter =
1087 client_id_to_shader_cache_.find(client_id); 1080 client_id_to_shader_cache_.find(client_id);
1088 // If the cache doesn't exist then this is an off the record profile. 1081 // If the cache doesn't exist then this is an off the record profile.
1089 if (iter == client_id_to_shader_cache_.end()) 1082 if (iter == client_id_to_shader_cache_.end())
1090 return; 1083 return;
1091 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader); 1084 iter->second->Cache(GetShaderPrefixKey() + ":" + key, shader);
1092 } 1085 }
1093 1086
1094 } // namespace content 1087 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698