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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "ui/gl/gl_switches.h" | 42 #include "ui/gl/gl_switches.h" |
43 #include "ui/gl/gpu_switching_manager.h" | 43 #include "ui/gl/gpu_switching_manager.h" |
44 | 44 |
45 #if defined(OS_MACOSX) | 45 #if defined(OS_MACOSX) |
46 #include <ApplicationServices/ApplicationServices.h> | 46 #include <ApplicationServices/ApplicationServices.h> |
47 #endif // OS_MACOSX | 47 #endif // OS_MACOSX |
48 #if defined(OS_WIN) | 48 #if defined(OS_WIN) |
49 #include "base/win/windows_version.h" | 49 #include "base/win/windows_version.h" |
50 #endif // OS_WIN | 50 #endif // OS_WIN |
51 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) | 51 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) |
52 #include "services/shell/runner/common/client_util.h" | 52 #include "services/shell/runner/common/client_util.h" // nogncheck |
| 53 #include "services/ui/common/gpu_service.h" // nogncheck |
53 #endif | 54 #endif |
54 | 55 |
55 namespace content { | 56 namespace content { |
56 | 57 |
57 namespace { | 58 namespace { |
58 | 59 |
59 enum GpuFeatureStatus { | 60 enum GpuFeatureStatus { |
60 kGpuFeatureEnabled = 0, | 61 kGpuFeatureEnabled = 0, |
61 kGpuFeatureBlacklisted = 1, | 62 kGpuFeatureBlacklisted = 1, |
62 kGpuFeatureDisabled = 2, // disabled by user but not blacklisted | 63 kGpuFeatureDisabled = 2, // disabled by user but not blacklisted |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 enum BlockStatusHistogram { | 261 enum BlockStatusHistogram { |
261 BLOCK_STATUS_NOT_BLOCKED, | 262 BLOCK_STATUS_NOT_BLOCKED, |
262 BLOCK_STATUS_SPECIFIC_DOMAIN_BLOCKED, | 263 BLOCK_STATUS_SPECIFIC_DOMAIN_BLOCKED, |
263 BLOCK_STATUS_ALL_DOMAINS_BLOCKED, | 264 BLOCK_STATUS_ALL_DOMAINS_BLOCKED, |
264 BLOCK_STATUS_MAX | 265 BLOCK_STATUS_MAX |
265 }; | 266 }; |
266 | 267 |
267 bool ShouldDisableHardwareAcceleration() { | 268 bool ShouldDisableHardwareAcceleration() { |
268 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) | 269 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) |
269 // TODO(rjkroege): Remove this when https://crbug.com/602519 is fixed. | 270 // TODO(rjkroege): Remove this when https://crbug.com/602519 is fixed. |
270 if (shell::ShellIsRemote()) | 271 if (shell::ShellIsRemote() && !ui::GpuService::UseChromeGpuCommandBuffer()) |
271 return true; | 272 return true; |
272 #endif | 273 #endif |
273 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 274 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
274 switches::kDisableGpu); | 275 switches::kDisableGpu); |
275 } | 276 } |
276 | 277 |
277 } // namespace anonymous | 278 } // namespace anonymous |
278 | 279 |
279 void GpuDataManagerImplPrivate::InitializeForTesting( | 280 void GpuDataManagerImplPrivate::InitializeForTesting( |
280 const std::string& gpu_blacklist_json, | 281 const std::string& gpu_blacklist_json, |
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1288 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1289 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
1289 #if defined(OS_WIN) | 1290 #if defined(OS_WIN) |
1290 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1291 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
1291 #endif | 1292 #endif |
1292 complete_gpu_info_already_requested_ = true; | 1293 complete_gpu_info_already_requested_ = true; |
1293 // Some observers might be waiting. | 1294 // Some observers might be waiting. |
1294 NotifyGpuInfoUpdate(); | 1295 NotifyGpuInfoUpdate(); |
1295 } | 1296 } |
1296 | 1297 |
1297 } // namespace content | 1298 } // namespace content |
OLD | NEW |