Chromium Code Reviews| 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 <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 30 #include "content/public/common/web_preferences.h" | 30 #include "content/public/common/web_preferences.h" |
| 31 #include "gpu/command_buffer/service/gpu_preferences.h" | 31 #include "gpu/command_buffer/service/gpu_preferences.h" |
| 32 #include "gpu/command_buffer/service/gpu_switches.h" | 32 #include "gpu/command_buffer/service/gpu_switches.h" |
| 33 #include "gpu/config/gpu_control_list_jsons.h" | 33 #include "gpu/config/gpu_control_list_jsons.h" |
| 34 #include "gpu/config/gpu_driver_bug_workaround_type.h" | 34 #include "gpu/config/gpu_driver_bug_workaround_type.h" |
| 35 #include "gpu/config/gpu_feature_type.h" | 35 #include "gpu/config/gpu_feature_type.h" |
| 36 #include "gpu/config/gpu_info_collector.h" | 36 #include "gpu/config/gpu_info_collector.h" |
| 37 #include "gpu/config/gpu_switches.h" | 37 #include "gpu/config/gpu_switches.h" |
| 38 #include "gpu/config/gpu_util.h" | 38 #include "gpu/config/gpu_util.h" |
| 39 #include "gpu/ipc/common/memory_stats.h" | 39 #include "gpu/ipc/common/memory_stats.h" |
| 40 #include "services/shell/runner/common/client_util.h" | |
| 40 #include "ui/base/ui_base_switches.h" | 41 #include "ui/base/ui_base_switches.h" |
| 41 #include "ui/gl/gl_implementation.h" | 42 #include "ui/gl/gl_implementation.h" |
| 42 #include "ui/gl/gl_switches.h" | 43 #include "ui/gl/gl_switches.h" |
| 43 #include "ui/gl/gpu_switching_manager.h" | 44 #include "ui/gl/gpu_switching_manager.h" |
| 44 | 45 |
| 45 #if defined(OS_MACOSX) | 46 #if defined(OS_MACOSX) |
| 46 #include <ApplicationServices/ApplicationServices.h> | 47 #include <ApplicationServices/ApplicationServices.h> |
| 47 #endif // OS_MACOSX | 48 #endif // OS_MACOSX |
| 48 #if defined(OS_WIN) | 49 #if defined(OS_WIN) |
| 49 #include "base/win/windows_version.h" | 50 #include "base/win/windows_version.h" |
| (...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 978 gpu_info_.secondary_gpus[ii].active = false; | 979 gpu_info_.secondary_gpus[ii].active = false; |
| 979 } | 980 } |
| 980 } | 981 } |
| 981 gpu_info_.gpu.active = false; | 982 gpu_info_.gpu.active = false; |
| 982 } | 983 } |
| 983 UpdateGpuInfoHelper(); | 984 UpdateGpuInfoHelper(); |
| 984 return true; | 985 return true; |
| 985 } | 986 } |
| 986 | 987 |
| 987 bool GpuDataManagerImplPrivate::CanUseGpuBrowserCompositor() const { | 988 bool GpuDataManagerImplPrivate::CanUseGpuBrowserCompositor() const { |
| 989 if (shell::ShellIsRemote()) | |
|
rjkroege
2016/08/11 17:55:38
While this is fine for now, I think that it's not
sadrul
2016/08/11 17:58:08
What sort of details do you have in mind? (we use
| |
| 990 return true; | |
| 988 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 991 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 989 switches::kDisableGpuCompositing)) | 992 switches::kDisableGpuCompositing)) |
| 990 return false; | 993 return false; |
| 991 if (ShouldUseSwiftShader()) | 994 if (ShouldUseSwiftShader()) |
| 992 return false; | 995 return false; |
| 993 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING)) | 996 if (IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING)) |
| 994 return false; | 997 return false; |
| 995 return true; | 998 return true; |
| 996 } | 999 } |
| 997 | 1000 |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1297 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1300 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
| 1298 #if defined(OS_WIN) | 1301 #if defined(OS_WIN) |
| 1299 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1302 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
| 1300 #endif | 1303 #endif |
| 1301 complete_gpu_info_already_requested_ = true; | 1304 complete_gpu_info_already_requested_ = true; |
| 1302 // Some observers might be waiting. | 1305 // Some observers might be waiting. |
| 1303 NotifyGpuInfoUpdate(); | 1306 NotifyGpuInfoUpdate(); |
| 1304 } | 1307 } |
| 1305 | 1308 |
| 1306 } // namespace content | 1309 } // namespace content |
| OLD | NEW |