OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "content/browser/gpu/gpu_data_manager_impl_private.h" | 5 #include "content/browser/gpu/gpu_data_manager_impl_private.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
991 DCHECK(owner_); | 991 DCHECK(owner_); |
992 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 992 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
993 if (command_line->HasSwitch(switches::kDisableAcceleratedCompositing)) { | 993 if (command_line->HasSwitch(switches::kDisableAcceleratedCompositing)) { |
994 command_line->AppendSwitch(switches::kDisableAccelerated2dCanvas); | 994 command_line->AppendSwitch(switches::kDisableAccelerated2dCanvas); |
995 command_line->AppendSwitch(switches::kDisableAcceleratedLayers); | 995 command_line->AppendSwitch(switches::kDisableAcceleratedLayers); |
996 } | 996 } |
997 if (command_line->HasSwitch(switches::kDisableGpu)) | 997 if (command_line->HasSwitch(switches::kDisableGpu)) |
998 DisableHardwareAcceleration(); | 998 DisableHardwareAcceleration(); |
999 if (command_line->HasSwitch(switches::kEnableSoftwareCompositing)) | 999 if (command_line->HasSwitch(switches::kEnableSoftwareCompositing)) |
1000 use_software_compositor_ = true; | 1000 use_software_compositor_ = true; |
| 1001 //TODO(jbauman): enable for Chrome OS and Linux |
| 1002 #if defined(USE_AURA) && defined(OS_WIN) |
| 1003 use_software_compositor_ = true; |
| 1004 #endif |
1001 if (command_line->HasSwitch(switches::kGpuSwitching)) { | 1005 if (command_line->HasSwitch(switches::kGpuSwitching)) { |
1002 std::string option_string = command_line->GetSwitchValueASCII( | 1006 std::string option_string = command_line->GetSwitchValueASCII( |
1003 switches::kGpuSwitching); | 1007 switches::kGpuSwitching); |
1004 gpu::GpuSwitchingOption option = | 1008 gpu::GpuSwitchingOption option = |
1005 gpu::StringToGpuSwitchingOption(option_string); | 1009 gpu::StringToGpuSwitchingOption(option_string); |
1006 if (option != gpu::GPU_SWITCHING_OPTION_UNKNOWN) | 1010 if (option != gpu::GPU_SWITCHING_OPTION_UNKNOWN) |
1007 gpu_switching_ = option; | 1011 gpu_switching_ = option; |
1008 } | 1012 } |
1009 | 1013 |
1010 #if defined(OS_MACOSX) | 1014 #if defined(OS_MACOSX) |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1234 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { | 1238 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { |
1235 gpu_process_accessible_ = false; | 1239 gpu_process_accessible_ = false; |
1236 gpu_info_.finalized = true; | 1240 gpu_info_.finalized = true; |
1237 complete_gpu_info_already_requested_ = true; | 1241 complete_gpu_info_already_requested_ = true; |
1238 // Some observers might be waiting. | 1242 // Some observers might be waiting. |
1239 NotifyGpuInfoUpdate(); | 1243 NotifyGpuInfoUpdate(); |
1240 } | 1244 } |
1241 | 1245 |
1242 } // namespace content | 1246 } // namespace content |
1243 | 1247 |
OLD | NEW |