OLD | NEW |
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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 | 7 |
8 #include "base/lazy_instance.h" | 8 #include "base/lazy_instance.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 std::string message = str.substr(message_start); | 121 std::string message = str.substr(message_start); |
122 deferred_messages.Get().push(new GpuHostMsg_OnLogMessage( | 122 deferred_messages.Get().push(new GpuHostMsg_OnLogMessage( |
123 severity, header, message)); | 123 severity, header, message)); |
124 return false; | 124 return false; |
125 } | 125 } |
126 | 126 |
127 } // namespace anonymous | 127 } // namespace anonymous |
128 | 128 |
129 // Main function for starting the Gpu process. | 129 // Main function for starting the Gpu process. |
130 int GpuMain(const MainFunctionParams& parameters) { | 130 int GpuMain(const MainFunctionParams& parameters) { |
| 131 DVLOG(1) << "gpu process running"; |
| 132 |
131 TRACE_EVENT0("gpu", "GpuMain"); | 133 TRACE_EVENT0("gpu", "GpuMain"); |
132 base::trace_event::TraceLog::GetInstance()->SetProcessName("GPU Process"); | 134 base::trace_event::TraceLog::GetInstance()->SetProcessName("GPU Process"); |
133 base::trace_event::TraceLog::GetInstance()->SetProcessSortIndex( | 135 base::trace_event::TraceLog::GetInstance()->SetProcessSortIndex( |
134 kTraceEventGpuProcessSortIndex); | 136 kTraceEventGpuProcessSortIndex); |
135 | 137 |
136 const base::CommandLine& command_line = parameters.command_line; | 138 const base::CommandLine& command_line = parameters.command_line; |
137 if (command_line.HasSwitch(switches::kGpuStartupDialog)) { | 139 if (command_line.HasSwitch(switches::kGpuStartupDialog)) { |
138 ChildProcess::WaitForDebugger("Gpu"); | 140 ChildProcess::WaitForDebugger("Gpu"); |
139 } | 141 } |
140 | 142 |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 return true; | 579 return true; |
578 } | 580 } |
579 | 581 |
580 return false; | 582 return false; |
581 } | 583 } |
582 #endif // defined(OS_WIN) | 584 #endif // defined(OS_WIN) |
583 | 585 |
584 } // namespace. | 586 } // namespace. |
585 | 587 |
586 } // namespace content | 588 } // namespace content |
OLD | NEW |