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 "content/browser/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 | 1029 |
1030 #if !defined(OS_IOS) | 1030 #if !defined(OS_IOS) |
1031 HistogramSynchronizer::GetInstance(); | 1031 HistogramSynchronizer::GetInstance(); |
1032 | 1032 |
1033 | 1033 |
1034 // GpuDataManager for in-process initialized in PreCreateThreads. | 1034 // GpuDataManager for in-process initialized in PreCreateThreads. |
1035 bool initialize_gpu_data_manager = !UsingInProcessGpu(); | 1035 bool initialize_gpu_data_manager = !UsingInProcessGpu(); |
1036 #if defined(OS_ANDROID) | 1036 #if defined(OS_ANDROID) |
1037 // Up the priority of anything that touches with display tasks | 1037 // Up the priority of anything that touches with display tasks |
1038 // (this thread is UI thread, and io_thread_ is for IPCs). | 1038 // (this thread is UI thread, and io_thread_ is for IPCs). |
1039 io_thread_->SetPriority(base::kThreadPriority_Display); | 1039 io_thread_->SetPriority(base::ThreadPriority::DISPLAY); |
1040 base::PlatformThread::SetThreadPriority( | 1040 base::PlatformThread::SetThreadPriority(base::PlatformThread::CurrentHandle(), |
1041 base::PlatformThread::CurrentHandle(), | 1041 base::ThreadPriority::DISPLAY); |
1042 base::kThreadPriority_Display); | |
1043 | 1042 |
1044 // On Android, GLSurface::InitializeOneOff() must be called before | 1043 // On Android, GLSurface::InitializeOneOff() must be called before |
1045 // initalizing the GpuDataManagerImpl as it uses the GL bindings. | 1044 // initalizing the GpuDataManagerImpl as it uses the GL bindings. |
1046 // TODO(sievers): Shouldn't need to init full bindings to determine GL | 1045 // TODO(sievers): Shouldn't need to init full bindings to determine GL |
1047 // version/vendor strings. crbug.com/326295 | 1046 // version/vendor strings. crbug.com/326295 |
1048 if (initialize_gpu_data_manager) { | 1047 if (initialize_gpu_data_manager) { |
1049 // Note InitializeOneOff is not safe either for in-process gpu after | 1048 // Note InitializeOneOff is not safe either for in-process gpu after |
1050 // creating threads, since it may race with the gpu thread. | 1049 // creating threads, since it may race with the gpu thread. |
1051 if (!gfx::GLSurface::InitializeOneOff()) { | 1050 if (!gfx::GLSurface::InitializeOneOff()) { |
1052 LOG(FATAL) << "GLSurface::InitializeOneOff failed"; | 1051 LOG(FATAL) << "GLSurface::InitializeOneOff failed"; |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1278 | 1277 |
1279 void BrowserMainLoop::EndStartupTracing() { | 1278 void BrowserMainLoop::EndStartupTracing() { |
1280 is_tracing_startup_ = false; | 1279 is_tracing_startup_ = false; |
1281 TracingController::GetInstance()->DisableRecording( | 1280 TracingController::GetInstance()->DisableRecording( |
1282 TracingController::CreateFileSink( | 1281 TracingController::CreateFileSink( |
1283 startup_trace_file_, | 1282 startup_trace_file_, |
1284 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1283 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1285 } | 1284 } |
1286 | 1285 |
1287 } // namespace content | 1286 } // namespace content |
OLD | NEW |