| 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <dwmapi.h> | 8 #include <dwmapi.h> |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #endif | 10 #endif |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" | 28 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" |
| 29 #include "content/common/gpu/media/gpu_video_encode_accelerator.h" | 29 #include "content/common/gpu/media/gpu_video_encode_accelerator.h" |
| 30 #include "content/common/sandbox_linux/sandbox_linux.h" | 30 #include "content/common/sandbox_linux/sandbox_linux.h" |
| 31 #include "content/gpu/gpu_child_thread.h" | 31 #include "content/gpu/gpu_child_thread.h" |
| 32 #include "content/gpu/gpu_process.h" | 32 #include "content/gpu/gpu_process.h" |
| 33 #include "content/gpu/gpu_watchdog_thread.h" | 33 #include "content/gpu/gpu_watchdog_thread.h" |
| 34 #include "content/public/common/content_client.h" | 34 #include "content/public/common/content_client.h" |
| 35 #include "content/public/common/content_switches.h" | 35 #include "content/public/common/content_switches.h" |
| 36 #include "content/public/common/main_function_params.h" | 36 #include "content/public/common/main_function_params.h" |
| 37 #include "gpu/command_buffer/service/gpu_switches.h" | 37 #include "gpu/command_buffer/service/gpu_switches.h" |
| 38 #include "gpu/command_buffer/service/sync_point_manager.h" |
| 38 #include "gpu/config/gpu_info_collector.h" | 39 #include "gpu/config/gpu_info_collector.h" |
| 39 #include "gpu/config/gpu_switches.h" | 40 #include "gpu/config/gpu_switches.h" |
| 40 #include "gpu/config/gpu_util.h" | 41 #include "gpu/config/gpu_util.h" |
| 41 #include "ui/events/platform/platform_event_source.h" | 42 #include "ui/events/platform/platform_event_source.h" |
| 42 #include "ui/gl/gl_context.h" | 43 #include "ui/gl/gl_context.h" |
| 43 #include "ui/gl/gl_implementation.h" | 44 #include "ui/gl/gl_implementation.h" |
| 44 #include "ui/gl/gl_surface.h" | 45 #include "ui/gl/gl_surface.h" |
| 45 #include "ui/gl/gl_switches.h" | 46 #include "ui/gl/gl_switches.h" |
| 46 #include "ui/gl/gpu_switching_manager.h" | 47 #include "ui/gl/gpu_switching_manager.h" |
| 47 | 48 |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 content::GpuVideoEncodeAccelerator::GetSupportedProfiles(); | 349 content::GpuVideoEncodeAccelerator::GetSupportedProfiles(); |
| 349 } else { | 350 } else { |
| 350 dead_on_arrival = true; | 351 dead_on_arrival = true; |
| 351 } | 352 } |
| 352 | 353 |
| 353 logging::SetLogMessageHandler(NULL); | 354 logging::SetLogMessageHandler(NULL); |
| 354 | 355 |
| 355 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory = | 356 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory = |
| 356 GpuMemoryBufferFactory::Create( | 357 GpuMemoryBufferFactory::Create( |
| 357 GpuChildThread::GetGpuMemoryBufferFactoryType()); | 358 GpuChildThread::GetGpuMemoryBufferFactoryType()); |
| 359 gpu::SyncPointManager sync_point_manager(false); |
| 358 | 360 |
| 359 GpuProcess gpu_process; | 361 GpuProcess gpu_process; |
| 360 | 362 |
| 361 GpuChildThread* child_thread = new GpuChildThread( | 363 GpuChildThread* child_thread = new GpuChildThread( |
| 362 watchdog_thread.get(), dead_on_arrival, gpu_info, deferred_messages.Get(), | 364 watchdog_thread.get(), dead_on_arrival, gpu_info, deferred_messages.Get(), |
| 363 gpu_memory_buffer_factory.get()); | 365 gpu_memory_buffer_factory.get(), |
| 366 &sync_point_manager); |
| 364 while (!deferred_messages.Get().empty()) | 367 while (!deferred_messages.Get().empty()) |
| 365 deferred_messages.Get().pop(); | 368 deferred_messages.Get().pop(); |
| 366 | 369 |
| 367 child_thread->Init(start_time); | 370 child_thread->Init(start_time); |
| 368 | 371 |
| 369 gpu_process.set_main_thread(child_thread); | 372 gpu_process.set_main_thread(child_thread); |
| 370 | 373 |
| 371 if (watchdog_thread.get()) | 374 if (watchdog_thread.get()) |
| 372 watchdog_thread->AddPowerObserver(); | 375 watchdog_thread->AddPowerObserver(); |
| 373 | 376 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 544 return true; | 547 return true; |
| 545 } | 548 } |
| 546 | 549 |
| 547 return false; | 550 return false; |
| 548 } | 551 } |
| 549 #endif // defined(OS_WIN) | 552 #endif // defined(OS_WIN) |
| 550 | 553 |
| 551 } // namespace. | 554 } // namespace. |
| 552 | 555 |
| 553 } // namespace content | 556 } // namespace content |
| OLD | NEW |