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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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(OS_ANDROID) | 51 #if defined(OS_ANDROID) |
52 #include "ui/gfx/android/device_display_info.h" | 52 #include "ui/gfx/android/device_display_info.h" |
53 #endif // OS_ANDROID | 53 #endif // OS_ANDROID |
54 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) | 54 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) |
55 #include "services/shell/runner/common/client_util.h" | 55 #include "components/mus/common/gpu_service.h" // nogncheck |
| 56 #include "services/shell/runner/common/client_util.h" // nogncheck |
56 #endif | 57 #endif |
57 | 58 |
58 namespace content { | 59 namespace content { |
59 | 60 |
60 namespace { | 61 namespace { |
61 | 62 |
62 enum GpuFeatureStatus { | 63 enum GpuFeatureStatus { |
63 kGpuFeatureEnabled = 0, | 64 kGpuFeatureEnabled = 0, |
64 kGpuFeatureBlacklisted = 1, | 65 kGpuFeatureBlacklisted = 1, |
65 kGpuFeatureDisabled = 2, // disabled by user but not blacklisted | 66 kGpuFeatureDisabled = 2, // disabled by user but not blacklisted |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 enum BlockStatusHistogram { | 264 enum BlockStatusHistogram { |
264 BLOCK_STATUS_NOT_BLOCKED, | 265 BLOCK_STATUS_NOT_BLOCKED, |
265 BLOCK_STATUS_SPECIFIC_DOMAIN_BLOCKED, | 266 BLOCK_STATUS_SPECIFIC_DOMAIN_BLOCKED, |
266 BLOCK_STATUS_ALL_DOMAINS_BLOCKED, | 267 BLOCK_STATUS_ALL_DOMAINS_BLOCKED, |
267 BLOCK_STATUS_MAX | 268 BLOCK_STATUS_MAX |
268 }; | 269 }; |
269 | 270 |
270 bool ShouldDisableHardwareAcceleration() { | 271 bool ShouldDisableHardwareAcceleration() { |
271 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) | 272 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) |
272 // TODO(rjkroege): Remove this when https://crbug.com/602519 is fixed. | 273 // TODO(rjkroege): Remove this when https://crbug.com/602519 is fixed. |
273 if (shell::ShellIsRemote()) | 274 if (shell::ShellIsRemote() && !mus::GpuService::UseChromeGpuCommandBuffer()) |
274 return true; | 275 return true; |
275 #endif | 276 #endif |
276 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 277 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
277 switches::kDisableGpu); | 278 switches::kDisableGpu); |
278 } | 279 } |
279 | 280 |
280 } // namespace anonymous | 281 } // namespace anonymous |
281 | 282 |
282 void GpuDataManagerImplPrivate::InitializeForTesting( | 283 void GpuDataManagerImplPrivate::InitializeForTesting( |
283 const std::string& gpu_blacklist_json, | 284 const std::string& gpu_blacklist_json, |
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1284 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1285 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
1285 #if defined(OS_WIN) | 1286 #if defined(OS_WIN) |
1286 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1287 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
1287 #endif | 1288 #endif |
1288 complete_gpu_info_already_requested_ = true; | 1289 complete_gpu_info_already_requested_ = true; |
1289 // Some observers might be waiting. | 1290 // Some observers might be waiting. |
1290 NotifyGpuInfoUpdate(); | 1291 NotifyGpuInfoUpdate(); |
1291 } | 1292 } |
1292 | 1293 |
1293 } // namespace content | 1294 } // namespace content |
OLD | NEW |