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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 command_line->AppendSwitchASCII(switches::kGpuVendorID, | 732 command_line->AppendSwitchASCII(switches::kGpuVendorID, |
733 base::StringPrintf("0x%04x", gpu_info_.gpu.vendor_id)); | 733 base::StringPrintf("0x%04x", gpu_info_.gpu.vendor_id)); |
734 command_line->AppendSwitchASCII(switches::kGpuDeviceID, | 734 command_line->AppendSwitchASCII(switches::kGpuDeviceID, |
735 base::StringPrintf("0x%04x", gpu_info_.gpu.device_id)); | 735 base::StringPrintf("0x%04x", gpu_info_.gpu.device_id)); |
736 command_line->AppendSwitchASCII(switches::kGpuDriverVendor, | 736 command_line->AppendSwitchASCII(switches::kGpuDriverVendor, |
737 gpu_info_.driver_vendor); | 737 gpu_info_.driver_vendor); |
738 command_line->AppendSwitchASCII(switches::kGpuDriverVersion, | 738 command_line->AppendSwitchASCII(switches::kGpuDriverVersion, |
739 gpu_info_.driver_version); | 739 gpu_info_.driver_version); |
740 } | 740 } |
741 | 741 |
742 void GpuDataManagerImplPrivate::AppendPluginCommandLine( | |
743 base::CommandLine* command_line) const { | |
744 DCHECK(command_line); | |
745 | |
746 #if defined(OS_MACOSX) | |
747 // TODO(jbauman): Add proper blacklist support for core animation plugins so | |
748 // special-casing this video card won't be necessary. See | |
749 // http://crbug.com/134015 | |
750 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING)) { | |
751 if (!command_line->HasSwitch( | |
752 switches::kDisableCoreAnimationPlugins)) | |
753 command_line->AppendSwitch( | |
754 switches::kDisableCoreAnimationPlugins); | |
755 } | |
756 #endif | |
757 } | |
758 | |
759 void GpuDataManagerImplPrivate::UpdateRendererWebPrefs( | 742 void GpuDataManagerImplPrivate::UpdateRendererWebPrefs( |
760 WebPreferences* prefs) const { | 743 WebPreferences* prefs) const { |
761 DCHECK(prefs); | 744 DCHECK(prefs); |
762 | 745 |
763 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL)) { | 746 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL)) { |
764 prefs->experimental_webgl_enabled = false; | 747 prefs->experimental_webgl_enabled = false; |
765 prefs->pepper_3d_enabled = false; | 748 prefs->pepper_3d_enabled = false; |
766 } | 749 } |
767 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_FLASH3D)) | 750 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_FLASH3D)) |
768 prefs->flash_3d_enabled = false; | 751 prefs->flash_3d_enabled = false; |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1234 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1217 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
1235 #if defined(OS_WIN) | 1218 #if defined(OS_WIN) |
1236 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1219 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
1237 #endif | 1220 #endif |
1238 complete_gpu_info_already_requested_ = true; | 1221 complete_gpu_info_already_requested_ = true; |
1239 // Some observers might be waiting. | 1222 // Some observers might be waiting. |
1240 NotifyGpuInfoUpdate(); | 1223 NotifyGpuInfoUpdate(); |
1241 } | 1224 } |
1242 | 1225 |
1243 } // namespace content | 1226 } // namespace content |
OLD | NEW |