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/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 command_line->AppendSwitchASCII(switches::kGpuVendorID, | 714 command_line->AppendSwitchASCII(switches::kGpuVendorID, |
715 base::StringPrintf("0x%04x", gpu_info_.gpu.vendor_id)); | 715 base::StringPrintf("0x%04x", gpu_info_.gpu.vendor_id)); |
716 command_line->AppendSwitchASCII(switches::kGpuDeviceID, | 716 command_line->AppendSwitchASCII(switches::kGpuDeviceID, |
717 base::StringPrintf("0x%04x", gpu_info_.gpu.device_id)); | 717 base::StringPrintf("0x%04x", gpu_info_.gpu.device_id)); |
718 command_line->AppendSwitchASCII(switches::kGpuDriverVendor, | 718 command_line->AppendSwitchASCII(switches::kGpuDriverVendor, |
719 gpu_info_.driver_vendor); | 719 gpu_info_.driver_vendor); |
720 command_line->AppendSwitchASCII(switches::kGpuDriverVersion, | 720 command_line->AppendSwitchASCII(switches::kGpuDriverVersion, |
721 gpu_info_.driver_version); | 721 gpu_info_.driver_version); |
722 } | 722 } |
723 | 723 |
724 void GpuDataManagerImplPrivate::AppendPluginCommandLine( | |
725 base::CommandLine* command_line) const { | |
726 DCHECK(command_line); | |
727 | |
728 #if defined(OS_MACOSX) | |
729 // TODO(jbauman): Add proper blacklist support for core animation plugins so | |
730 // special-casing this video card won't be necessary. See | |
731 // http://crbug.com/134015 | |
732 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING)) { | |
733 if (!command_line->HasSwitch( | |
734 switches::kDisableCoreAnimationPlugins)) | |
735 command_line->AppendSwitch( | |
736 switches::kDisableCoreAnimationPlugins); | |
737 } | |
738 #endif | |
739 } | |
740 | |
741 void GpuDataManagerImplPrivate::UpdateRendererWebPrefs( | 724 void GpuDataManagerImplPrivate::UpdateRendererWebPrefs( |
742 WebPreferences* prefs) const { | 725 WebPreferences* prefs) const { |
743 DCHECK(prefs); | 726 DCHECK(prefs); |
744 | 727 |
745 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL)) { | 728 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL)) { |
746 prefs->experimental_webgl_enabled = false; | 729 prefs->experimental_webgl_enabled = false; |
747 prefs->pepper_3d_enabled = false; | 730 prefs->pepper_3d_enabled = false; |
748 } | 731 } |
749 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_FLASH3D)) | 732 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_FLASH3D)) |
750 prefs->flash_3d_enabled = false; | 733 prefs->flash_3d_enabled = false; |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1214 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1197 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
1215 #if defined(OS_WIN) | 1198 #if defined(OS_WIN) |
1216 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1199 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
1217 #endif | 1200 #endif |
1218 complete_gpu_info_already_requested_ = true; | 1201 complete_gpu_info_already_requested_ = true; |
1219 // Some observers might be waiting. | 1202 // Some observers might be waiting. |
1220 NotifyGpuInfoUpdate(); | 1203 NotifyGpuInfoUpdate(); |
1221 } | 1204 } |
1222 | 1205 |
1223 } // namespace content | 1206 } // namespace content |
OLD | NEW |