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

Side by Side Diff: content/gpu/gpu_main.cc

Issue 1730023004: Revert of Decouple browser-specific GPU IPC messages from GPU service IPCs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | content/renderer/gpu/gpu_benchmarking_extension.cc » ('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 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 7
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "base/metrics/histogram.h" 12 #include "base/metrics/histogram.h"
13 #include "base/metrics/statistics_recorder.h" 13 #include "base/metrics/statistics_recorder.h"
14 #include "base/rand_util.h" 14 #include "base/rand_util.h"
15 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
16 #include "base/strings/stringprintf.h" 16 #include "base/strings/stringprintf.h"
17 #include "base/third_party/dynamic_annotations/dynamic_annotations.h" 17 #include "base/third_party/dynamic_annotations/dynamic_annotations.h"
18 #include "base/threading/platform_thread.h" 18 #include "base/threading/platform_thread.h"
19 #include "base/trace_event/trace_event.h" 19 #include "base/trace_event/trace_event.h"
20 #include "build/build_config.h" 20 #include "build/build_config.h"
21 #include "content/child/child_process.h" 21 #include "content/child/child_process.h"
22 #include "content/common/content_constants_internal.h" 22 #include "content/common/content_constants_internal.h"
23 #include "content/common/gpu/gpu_config.h" 23 #include "content/common/gpu/gpu_config.h"
24 #include "content/common/gpu/gpu_host_messages.h"
25 #include "content/common/gpu/gpu_memory_buffer_factory.h" 24 #include "content/common/gpu/gpu_memory_buffer_factory.h"
25 #include "content/common/gpu/gpu_messages.h"
26 #include "content/common/gpu/media/gpu_jpeg_decode_accelerator.h" 26 #include "content/common/gpu/media/gpu_jpeg_decode_accelerator.h"
27 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" 27 #include "content/common/gpu/media/gpu_video_decode_accelerator.h"
28 #include "content/common/gpu/media/gpu_video_encode_accelerator.h" 28 #include "content/common/gpu/media/gpu_video_encode_accelerator.h"
29 #include "content/common/sandbox_linux/sandbox_linux.h" 29 #include "content/common/sandbox_linux/sandbox_linux.h"
30 #include "content/gpu/gpu_child_thread.h" 30 #include "content/gpu/gpu_child_thread.h"
31 #include "content/gpu/gpu_process.h" 31 #include "content/gpu/gpu_process.h"
32 #include "content/gpu/gpu_watchdog_thread.h" 32 #include "content/gpu/gpu_watchdog_thread.h"
33 #include "content/public/common/content_client.h" 33 #include "content/public/common/content_client.h"
34 #include "content/public/common/content_switches.h" 34 #include "content/public/common/content_switches.h"
35 #include "content/public/common/main_function_params.h" 35 #include "content/public/common/main_function_params.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 base::LazyInstance<GpuChildThread::DeferredMessages> deferred_messages = 115 base::LazyInstance<GpuChildThread::DeferredMessages> deferred_messages =
116 LAZY_INSTANCE_INITIALIZER; 116 LAZY_INSTANCE_INITIALIZER;
117 117
118 bool GpuProcessLogMessageHandler(int severity, 118 bool GpuProcessLogMessageHandler(int severity,
119 const char* file, int line, 119 const char* file, int line,
120 size_t message_start, 120 size_t message_start,
121 const std::string& str) { 121 const std::string& str) {
122 std::string header = str.substr(0, message_start); 122 std::string header = str.substr(0, message_start);
123 std::string message = str.substr(message_start); 123 std::string message = str.substr(message_start);
124 deferred_messages.Get().push( 124 deferred_messages.Get().push(new GpuHostMsg_OnLogMessage(
125 new GpuHostMsg_OnLogMessage(severity, header, message)); 125 severity, header, message));
126 return false; 126 return false;
127 } 127 }
128 128
129 } // namespace anonymous 129 } // namespace anonymous
130 130
131 // Main function for starting the Gpu process. 131 // Main function for starting the Gpu process.
132 int GpuMain(const MainFunctionParams& parameters) { 132 int GpuMain(const MainFunctionParams& parameters) {
133 TRACE_EVENT0("gpu", "GpuMain"); 133 TRACE_EVENT0("gpu", "GpuMain");
134 base::trace_event::TraceLog::GetInstance()->SetProcessName("GPU Process"); 134 base::trace_event::TraceLog::GetInstance()->SetProcessName("GPU Process");
135 base::trace_event::TraceLog::GetInstance()->SetProcessSortIndex( 135 base::trace_event::TraceLog::GetInstance()->SetProcessSortIndex(
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 return true; 593 return true;
594 } 594 }
595 595
596 return false; 596 return false;
597 } 597 }
598 #endif // defined(OS_WIN) 598 #endif // defined(OS_WIN)
599 599
600 } // namespace. 600 } // namespace.
601 601
602 } // namespace content 602 } // namespace content
OLDNEW
« no previous file with comments | « content/gpu/gpu_child_thread.cc ('k') | content/renderer/gpu/gpu_benchmarking_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698