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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 } | 387 } |
388 | 388 |
389 logging::SetLogMessageHandler(NULL); | 389 logging::SetLogMessageHandler(NULL); |
390 | 390 |
391 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory; | 391 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory; |
392 if (GpuMemoryBufferFactory::GetNativeType() != gfx::EMPTY_BUFFER) | 392 if (GpuMemoryBufferFactory::GetNativeType() != gfx::EMPTY_BUFFER) |
393 gpu_memory_buffer_factory = GpuMemoryBufferFactory::CreateNativeType(); | 393 gpu_memory_buffer_factory = GpuMemoryBufferFactory::CreateNativeType(); |
394 | 394 |
395 gpu::SyncPointManager sync_point_manager(false); | 395 gpu::SyncPointManager sync_point_manager(false); |
396 | 396 |
397 GpuProcess gpu_process; | 397 base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL; |
| 398 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
| 399 io_thread_priority = base::ThreadPriority::DISPLAY; |
| 400 #endif |
| 401 |
| 402 GpuProcess gpu_process(io_thread_priority); |
398 | 403 |
399 GpuChildThread* child_thread = new GpuChildThread( | 404 GpuChildThread* child_thread = new GpuChildThread( |
400 watchdog_thread.get(), dead_on_arrival, gpu_info, deferred_messages.Get(), | 405 watchdog_thread.get(), dead_on_arrival, gpu_info, deferred_messages.Get(), |
401 gpu_memory_buffer_factory.get(), | 406 gpu_memory_buffer_factory.get(), |
402 &sync_point_manager); | 407 &sync_point_manager); |
403 while (!deferred_messages.Get().empty()) | 408 while (!deferred_messages.Get().empty()) |
404 deferred_messages.Get().pop(); | 409 deferred_messages.Get().pop(); |
405 | 410 |
406 child_thread->Init(start_time); | 411 child_thread->Init(start_time); |
407 | 412 |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 return true; | 593 return true; |
589 } | 594 } |
590 | 595 |
591 return false; | 596 return false; |
592 } | 597 } |
593 #endif // defined(OS_WIN) | 598 #endif // defined(OS_WIN) |
594 | 599 |
595 } // namespace. | 600 } // namespace. |
596 | 601 |
597 } // namespace content | 602 } // namespace content |
OLD | NEW |