| 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 | 259 |
| 260 // Enums for UMA histograms. | 260 // Enums for UMA histograms. |
| 261 enum BlockStatusHistogram { | 261 enum BlockStatusHistogram { |
| 262 BLOCK_STATUS_NOT_BLOCKED, | 262 BLOCK_STATUS_NOT_BLOCKED, |
| 263 BLOCK_STATUS_SPECIFIC_DOMAIN_BLOCKED, | 263 BLOCK_STATUS_SPECIFIC_DOMAIN_BLOCKED, |
| 264 BLOCK_STATUS_ALL_DOMAINS_BLOCKED, | 264 BLOCK_STATUS_ALL_DOMAINS_BLOCKED, |
| 265 BLOCK_STATUS_MAX | 265 BLOCK_STATUS_MAX |
| 266 }; | 266 }; |
| 267 | 267 |
| 268 bool ShouldDisableHardwareAcceleration() { | 268 bool ShouldDisableHardwareAcceleration() { |
| 269 #if defined(MOJO_SHELL_CLIENT) && defined(USE_AURA) | |
| 270 // TODO(rjkroege): Remove this when https://crbug.com/602519 is fixed. | |
| 271 if (shell::ShellIsRemote() && !ui::GpuService::UseChromeGpuCommandBuffer()) | |
| 272 return true; | |
| 273 #endif | |
| 274 return base::CommandLine::ForCurrentProcess()->HasSwitch( | 269 return base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 275 switches::kDisableGpu); | 270 switches::kDisableGpu); |
| 276 } | 271 } |
| 277 | 272 |
| 278 } // namespace anonymous | 273 } // namespace anonymous |
| 279 | 274 |
| 280 void GpuDataManagerImplPrivate::InitializeForTesting( | 275 void GpuDataManagerImplPrivate::InitializeForTesting( |
| 281 const std::string& gpu_blacklist_json, | 276 const std::string& gpu_blacklist_json, |
| 282 const gpu::GPUInfo& gpu_info) { | 277 const gpu::GPUInfo& gpu_info) { |
| 283 // This function is for testing only, so disable histograms. | 278 // This function is for testing only, so disable histograms. |
| (...skipping 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1297 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1292 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
| 1298 #if defined(OS_WIN) | 1293 #if defined(OS_WIN) |
| 1299 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1294 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
| 1300 #endif | 1295 #endif |
| 1301 complete_gpu_info_already_requested_ = true; | 1296 complete_gpu_info_already_requested_ = true; |
| 1302 // Some observers might be waiting. | 1297 // Some observers might be waiting. |
| 1303 NotifyGpuInfoUpdate(); | 1298 NotifyGpuInfoUpdate(); |
| 1304 } | 1299 } |
| 1305 | 1300 |
| 1306 } // namespace content | 1301 } // namespace content |
| OLD | NEW |