| 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 17 matching lines...) Expand all Loading... |
| 28 #include "content/gpu/gpu_process.h" | 28 #include "content/gpu/gpu_process.h" |
| 29 #include "content/gpu/gpu_watchdog_thread.h" | 29 #include "content/gpu/gpu_watchdog_thread.h" |
| 30 #include "content/public/common/content_client.h" | 30 #include "content/public/common/content_client.h" |
| 31 #include "content/public/common/content_switches.h" | 31 #include "content/public/common/content_switches.h" |
| 32 #include "content/public/common/main_function_params.h" | 32 #include "content/public/common/main_function_params.h" |
| 33 #include "gpu/command_buffer/service/gpu_switches.h" | 33 #include "gpu/command_buffer/service/gpu_switches.h" |
| 34 #include "gpu/command_buffer/service/sync_point_manager.h" | 34 #include "gpu/command_buffer/service/sync_point_manager.h" |
| 35 #include "gpu/config/gpu_info_collector.h" | 35 #include "gpu/config/gpu_info_collector.h" |
| 36 #include "gpu/config/gpu_switches.h" | 36 #include "gpu/config/gpu_switches.h" |
| 37 #include "gpu/config/gpu_util.h" | 37 #include "gpu/config/gpu_util.h" |
| 38 #include "gpu/ipc/common/gpu_memory_buffer_support.h" |
| 38 #include "ui/events/platform/platform_event_source.h" | 39 #include "ui/events/platform/platform_event_source.h" |
| 39 #include "ui/gl/gl_context.h" | 40 #include "ui/gl/gl_context.h" |
| 40 #include "ui/gl/gl_implementation.h" | 41 #include "ui/gl/gl_implementation.h" |
| 41 #include "ui/gl/gl_surface.h" | 42 #include "ui/gl/gl_surface.h" |
| 42 #include "ui/gl/gl_switches.h" | 43 #include "ui/gl/gl_switches.h" |
| 43 #include "ui/gl/gpu_switching_manager.h" | 44 #include "ui/gl/gpu_switching_manager.h" |
| 44 | 45 |
| 45 #if defined(OS_WIN) | 46 #if defined(OS_WIN) |
| 46 #include <dwmapi.h> | 47 #include <dwmapi.h> |
| 47 #include <windows.h> | 48 #include <windows.h> |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 #elif defined(OS_MACOSX) | 382 #elif defined(OS_MACOSX) |
| 382 gpu_info.sandboxed = Sandbox::SandboxIsCurrentlyActive(); | 383 gpu_info.sandboxed = Sandbox::SandboxIsCurrentlyActive(); |
| 383 #endif | 384 #endif |
| 384 } else { | 385 } else { |
| 385 dead_on_arrival = true; | 386 dead_on_arrival = true; |
| 386 } | 387 } |
| 387 | 388 |
| 388 logging::SetLogMessageHandler(NULL); | 389 logging::SetLogMessageHandler(NULL); |
| 389 | 390 |
| 390 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory; | 391 scoped_ptr<GpuMemoryBufferFactory> gpu_memory_buffer_factory; |
| 391 if (GpuMemoryBufferFactory::GetNativeType() != gfx::EMPTY_BUFFER) | 392 if (gpu::GetNativeGpuMemoryBufferType() != gfx::EMPTY_BUFFER) |
| 392 gpu_memory_buffer_factory = GpuMemoryBufferFactory::CreateNativeType(); | 393 gpu_memory_buffer_factory = GpuMemoryBufferFactory::CreateNativeType(); |
| 393 | 394 |
| 394 gpu::SyncPointManager sync_point_manager(false); | 395 gpu::SyncPointManager sync_point_manager(false); |
| 395 | 396 |
| 396 base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL; | 397 base::ThreadPriority io_thread_priority = base::ThreadPriority::NORMAL; |
| 397 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) | 398 #if defined(OS_ANDROID) || defined(OS_CHROMEOS) |
| 398 io_thread_priority = base::ThreadPriority::DISPLAY; | 399 io_thread_priority = base::ThreadPriority::DISPLAY; |
| 399 #endif | 400 #endif |
| 400 | 401 |
| 401 GpuProcess gpu_process(io_thread_priority); | 402 GpuProcess gpu_process(io_thread_priority); |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 return true; | 593 return true; |
| 593 } | 594 } |
| 594 | 595 |
| 595 return false; | 596 return false; |
| 596 } | 597 } |
| 597 #endif // defined(OS_WIN) | 598 #endif // defined(OS_WIN) |
| 598 | 599 |
| 599 } // namespace. | 600 } // namespace. |
| 600 | 601 |
| 601 } // namespace content | 602 } // namespace content |
| OLD | NEW |