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 29 matching lines...) Expand all Loading... |
40 #include "ui/gl/gl_surface.h" | 40 #include "ui/gl/gl_surface.h" |
41 #include "ui/gl/gl_switches.h" | 41 #include "ui/gl/gl_switches.h" |
42 #include "ui/gl/gpu_switching_manager.h" | 42 #include "ui/gl/gpu_switching_manager.h" |
43 | 43 |
44 #if defined(OS_WIN) | 44 #if defined(OS_WIN) |
45 #include "base/win/windows_version.h" | 45 #include "base/win/windows_version.h" |
46 #include "base/win/scoped_com_initializer.h" | 46 #include "base/win/scoped_com_initializer.h" |
47 #include "sandbox/win/src/sandbox.h" | 47 #include "sandbox/win/src/sandbox.h" |
48 #endif | 48 #endif |
49 | 49 |
| 50 #if defined(USE_OZONE) |
| 51 #include "ui/ozone/public/ozone_platform.h" |
| 52 #endif |
| 53 |
50 #if defined(USE_X11) | 54 #if defined(USE_X11) |
51 #include "ui/base/x/x11_util.h" | 55 #include "ui/base/x/x11_util.h" |
52 #endif | 56 #endif |
53 | 57 |
54 #if defined(OS_LINUX) | 58 #if defined(OS_LINUX) |
55 #include "content/public/common/sandbox_init.h" | 59 #include "content/public/common/sandbox_init.h" |
56 #endif | 60 #endif |
57 | 61 |
58 #if defined(OS_MACOSX) | 62 #if defined(OS_MACOSX) |
59 #include "base/message_loop/message_pump_mac.h" | 63 #include "base/message_loop/message_pump_mac.h" |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 | 281 |
278 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) | 282 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) |
279 // Recompute gpu driver bug workarounds - this is specifically useful | 283 // Recompute gpu driver bug workarounds - this is specifically useful |
280 // on systems where vendor_id/device_id aren't available. | 284 // on systems where vendor_id/device_id aren't available. |
281 if (!command_line.HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) { | 285 if (!command_line.HasSwitch(switches::kDisableGpuDriverBugWorkarounds)) { |
282 gpu::ApplyGpuDriverBugWorkarounds( | 286 gpu::ApplyGpuDriverBugWorkarounds( |
283 gpu_info, const_cast<base::CommandLine*>(&command_line)); | 287 gpu_info, const_cast<base::CommandLine*>(&command_line)); |
284 } | 288 } |
285 #endif | 289 #endif |
286 | 290 |
| 291 #if defined(USE_OZONE) |
| 292 ui::OzonePlatform::InitializeForGPUPostMainLoop(); |
| 293 #endif |
| 294 |
287 #if defined(OS_LINUX) | 295 #if defined(OS_LINUX) |
288 initialized_gl_context = true; | 296 initialized_gl_context = true; |
289 #if !defined(OS_CHROMEOS) | 297 #if !defined(OS_CHROMEOS) |
290 if (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA | 298 if (gpu_info.gpu.vendor_id == 0x10de && // NVIDIA |
291 gpu_info.driver_vendor == "NVIDIA" && | 299 gpu_info.driver_vendor == "NVIDIA" && |
292 !CanAccessNvidiaDeviceFile()) | 300 !CanAccessNvidiaDeviceFile()) |
293 dead_on_arrival = true; | 301 dead_on_arrival = true; |
294 #endif // !defined(OS_CHROMEOS) | 302 #endif // !defined(OS_CHROMEOS) |
295 #endif // defined(OS_LINUX) | 303 #endif // defined(OS_LINUX) |
296 #endif // !defined(OS_MACOSX) | 304 #endif // !defined(OS_MACOSX) |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 return true; | 541 return true; |
534 } | 542 } |
535 | 543 |
536 return false; | 544 return false; |
537 } | 545 } |
538 #endif // defined(OS_WIN) | 546 #endif // defined(OS_WIN) |
539 | 547 |
540 } // namespace. | 548 } // namespace. |
541 | 549 |
542 } // namespace content | 550 } // namespace content |
OLD | NEW |