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

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

Issue 1690173004: content: Increase thread priority for display critical IO threads on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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_process.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/gpu/in_process_gpu_thread.h" 5 #include "content/gpu/in_process_gpu_thread.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "content/common/gpu/gpu_memory_buffer_factory.h" 9 #include "content/common/gpu/gpu_memory_buffer_factory.h"
10 #include "content/gpu/gpu_child_thread.h" 10 #include "content/gpu/gpu_child_thread.h"
(...skipping 29 matching lines...) Expand all
40 40
41 void InProcessGpuThread::Init() { 41 void InProcessGpuThread::Init() {
42 // Call AttachCurrentThreadWithName, before any other AttachCurrentThread() 42 // Call AttachCurrentThreadWithName, before any other AttachCurrentThread()
43 // calls. The latter causes Java VM to assign Thread-??? to the thread name. 43 // calls. The latter causes Java VM to assign Thread-??? to the thread name.
44 // Please note calls to AttachCurrentThreadWithName after AttachCurrentThread 44 // Please note calls to AttachCurrentThreadWithName after AttachCurrentThread
45 // will not change the thread name kept in Java VM. 45 // will not change the thread name kept in Java VM.
46 #if defined(OS_ANDROID) 46 #if defined(OS_ANDROID)
47 base::android::AttachCurrentThreadWithName(thread_name()); 47 base::android::AttachCurrentThreadWithName(thread_name());
48 #endif 48 #endif
49 49
50 gpu_process_ = new GpuProcess(); 50 gpu_process_ = new GpuProcess(base::ThreadPriority::NORMAL);
piman 2016/02/12 21:09:14 Android uses this, and it would make sense to bump
reveman 2016/02/12 21:40:21 Makes sense. Latest patch sets the priority here a
51 51
52 // The process object takes ownership of the thread object, so do not 52 // The process object takes ownership of the thread object, so do not
53 // save and delete the pointer. 53 // save and delete the pointer.
54 GpuChildThread* child_thread = new GpuChildThread( 54 GpuChildThread* child_thread = new GpuChildThread(
55 params_, gpu_memory_buffer_factory_.get(), sync_point_manager_override_); 55 params_, gpu_memory_buffer_factory_.get(), sync_point_manager_override_);
56 56
57 // Since we are in the browser process, use the thread start time as the 57 // Since we are in the browser process, use the thread start time as the
58 // process start time. 58 // process start time.
59 child_thread->Init(base::Time::Now()); 59 child_thread->Init(base::Time::Now());
60 60
61 gpu_process_->set_main_thread(child_thread); 61 gpu_process_->set_main_thread(child_thread);
62 } 62 }
63 63
64 void InProcessGpuThread::CleanUp() { 64 void InProcessGpuThread::CleanUp() {
65 SetThreadWasQuitProperly(true); 65 SetThreadWasQuitProperly(true);
66 delete gpu_process_; 66 delete gpu_process_;
67 } 67 }
68 68
69 base::Thread* CreateInProcessGpuThread( 69 base::Thread* CreateInProcessGpuThread(
70 const InProcessChildThreadParams& params) { 70 const InProcessChildThreadParams& params) {
71 return new InProcessGpuThread(params, nullptr); 71 return new InProcessGpuThread(params, nullptr);
72 } 72 }
73 73
74 } // namespace content 74 } // namespace content
OLDNEW
« no previous file with comments | « content/gpu/gpu_process.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698