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 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 gpu_info_.secondary_gpus[ii].active = false; | 815 gpu_info_.secondary_gpus[ii].active = false; |
816 } | 816 } |
817 } | 817 } |
818 gpu_info_.gpu.active = false; | 818 gpu_info_.gpu.active = false; |
819 } | 819 } |
820 UpdateGpuInfoHelper(); | 820 UpdateGpuInfoHelper(); |
821 return true; | 821 return true; |
822 } | 822 } |
823 | 823 |
824 bool GpuDataManagerImplPrivate::CanUseGpuBrowserCompositor() const { | 824 bool GpuDataManagerImplPrivate::CanUseGpuBrowserCompositor() const { |
| 825 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 826 switches::kDisableGpuCompositing)) |
| 827 return false; |
825 if (ShouldUseWarp()) | 828 if (ShouldUseWarp()) |
826 return true; | 829 return true; |
827 if (ShouldUseSwiftShader()) | 830 if (ShouldUseSwiftShader()) |
828 return false; | 831 return false; |
829 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING)) | 832 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING)) |
830 return false; | 833 return false; |
831 return true; | 834 return true; |
832 } | 835 } |
833 | 836 |
834 void GpuDataManagerImplPrivate::BlockDomainFrom3DAPIs( | 837 void GpuDataManagerImplPrivate::BlockDomainFrom3DAPIs( |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1105 | 1108 |
1106 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { | 1109 void GpuDataManagerImplPrivate::OnGpuProcessInitFailure() { |
1107 gpu_process_accessible_ = false; | 1110 gpu_process_accessible_ = false; |
1108 gpu_info_.finalized = true; | 1111 gpu_info_.finalized = true; |
1109 complete_gpu_info_already_requested_ = true; | 1112 complete_gpu_info_already_requested_ = true; |
1110 // Some observers might be waiting. | 1113 // Some observers might be waiting. |
1111 NotifyGpuInfoUpdate(); | 1114 NotifyGpuInfoUpdate(); |
1112 } | 1115 } |
1113 | 1116 |
1114 } // namespace content | 1117 } // namespace content |
OLD | NEW |