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 <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 return; // This call contains no information about the display change | 253 return; // This call contains no information about the display change |
254 | 254 |
255 GpuDataManagerImpl* manager = | 255 GpuDataManagerImpl* manager = |
256 reinterpret_cast<GpuDataManagerImpl*>(gpu_data_manager); | 256 reinterpret_cast<GpuDataManagerImpl*>(gpu_data_manager); |
257 DCHECK(manager); | 257 DCHECK(manager); |
258 | 258 |
259 bool gpu_changed = false; | 259 bool gpu_changed = false; |
260 if (flags & kCGDisplayAddFlag) { | 260 if (flags & kCGDisplayAddFlag) { |
261 gpu::GPUInfo gpu_info; | 261 gpu::GPUInfo gpu_info; |
262 if (gpu::CollectBasicGraphicsInfo(&gpu_info) == gpu::kCollectInfoSuccess) { | 262 if (gpu::CollectBasicGraphicsInfo(&gpu_info) == gpu::kCollectInfoSuccess) { |
263 gpu_changed = manager->UpdateActiveGpu(gpu_info.gpu.vendor_id, | 263 gpu_changed = manager->UpdateActiveGpu(gpu_info.active_gpu().vendor_id, |
264 gpu_info.gpu.device_id); | 264 gpu_info.active_gpu().device_id); |
265 } | 265 } |
266 } | 266 } |
267 | 267 |
268 if (gpu_changed) | 268 if (gpu_changed) |
269 manager->HandleGpuSwitch(); | 269 manager->HandleGpuSwitch(); |
270 } | 270 } |
271 #endif // OS_MACOSX | 271 #endif // OS_MACOSX |
272 | 272 |
273 // Block all domains' use of 3D APIs for this many milliseconds if | 273 // Block all domains' use of 3D APIs for this many milliseconds if |
274 // approaching a threshold where system stability might be compromised. | 274 // approaching a threshold where system stability might be compromised. |
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1402 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1402 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
1403 #if defined(OS_WIN) | 1403 #if defined(OS_WIN) |
1404 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1404 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
1405 #endif | 1405 #endif |
1406 complete_gpu_info_already_requested_ = true; | 1406 complete_gpu_info_already_requested_ = true; |
1407 // Some observers might be waiting. | 1407 // Some observers might be waiting. |
1408 NotifyGpuInfoUpdate(); | 1408 NotifyGpuInfoUpdate(); |
1409 } | 1409 } |
1410 | 1410 |
1411 } // namespace content | 1411 } // namespace content |
OLD | NEW |