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 <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
394 | 394 |
395 gpu::SyncPointManager sync_point_manager(false); | 395 gpu::SyncPointManager sync_point_manager(false); |
396 | 396 |
397 base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL; | 397 base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL; |
398 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) | 398 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
399 io_thread_priority = base::ThreadPriority::DISPLAY; | 399 io_thread_priority = base::ThreadPriority::DISPLAY; |
400 #endif | 400 #endif |
401 | 401 |
402 GpuProcess gpu_process(io_thread_priority); | 402 GpuProcess gpu_process(io_thread_priority); |
403 | 403 |
404 const gpu::GpuPreferences* kGpuPreferences = nullptr; | |
boliu
2016/02/26 22:17:32
style: kGpuPreferences is only for static/global c
Peng
2016/02/29 16:09:22
Done.
| |
404 GpuChildThread* child_thread = new GpuChildThread( | 405 GpuChildThread* child_thread = new GpuChildThread( |
406 kGpuPreferences, | |
405 watchdog_thread.get(), dead_on_arrival, gpu_info, deferred_messages.Get(), | 407 watchdog_thread.get(), dead_on_arrival, gpu_info, deferred_messages.Get(), |
406 gpu_memory_buffer_factory.get(), | 408 gpu_memory_buffer_factory.get(), |
407 &sync_point_manager); | 409 &sync_point_manager); |
408 while (!deferred_messages.Get().empty()) | 410 while (!deferred_messages.Get().empty()) |
409 deferred_messages.Get().pop(); | 411 deferred_messages.Get().pop(); |
410 | 412 |
411 child_thread->Init(start_time); | 413 child_thread->Init(start_time); |
412 | 414 |
413 gpu_process.set_main_thread(child_thread); | 415 gpu_process.set_main_thread(child_thread); |
414 | 416 |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
593 return true; | 595 return true; |
594 } | 596 } |
595 | 597 |
596 return false; | 598 return false; |
597 } | 599 } |
598 #endif // defined(OS_WIN) | 600 #endif // defined(OS_WIN) |
599 | 601 |
600 } // namespace. | 602 } // namespace. |
601 | 603 |
602 } // namespace content | 604 } // namespace content |
OLD | NEW |