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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 | 635 |
636 bool was_info_available = IsCompleteGpuInfoAvailable(); | 636 bool was_info_available = IsCompleteGpuInfoAvailable(); |
637 gpu::MergeGPUInfo(&gpu_info_, gpu_info); | 637 gpu::MergeGPUInfo(&gpu_info_, gpu_info); |
638 if (IsCompleteGpuInfoAvailable()) { | 638 if (IsCompleteGpuInfoAvailable()) { |
639 complete_gpu_info_already_requested_ = true; | 639 complete_gpu_info_already_requested_ = true; |
640 } else if (was_info_available) { | 640 } else if (was_info_available) { |
641 // Allow future requests to go through properly. | 641 // Allow future requests to go through properly. |
642 complete_gpu_info_already_requested_ = false; | 642 complete_gpu_info_already_requested_ = false; |
643 } | 643 } |
644 | 644 |
| 645 #if !defined(OS_MACOSX) |
| 646 // TODO(j.isorce): Currenly the GPU process does not know about any secondary |
| 647 // gpu. So for now it requires to do the identification here because gpu_info_ |
| 648 // contains both secondary_gpus and gl_vendor/gl_renderer information. |
| 649 gpu::IdentifyActiveGPU(&gpu_info_); |
| 650 #endif |
| 651 |
645 UpdateGpuInfoHelper(); | 652 UpdateGpuInfoHelper(); |
646 } | 653 } |
647 | 654 |
648 void GpuDataManagerImplPrivate::UpdateVideoMemoryUsageStats( | 655 void GpuDataManagerImplPrivate::UpdateVideoMemoryUsageStats( |
649 const gpu::VideoMemoryUsageStats& video_memory_usage_stats) { | 656 const gpu::VideoMemoryUsageStats& video_memory_usage_stats) { |
650 GpuDataManagerImpl::UnlockedSession session(owner_); | 657 GpuDataManagerImpl::UnlockedSession session(owner_); |
651 observer_list_->Notify(FROM_HERE, | 658 observer_list_->Notify(FROM_HERE, |
652 &GpuDataManagerObserver::OnVideoMemoryUsageStatsUpdate, | 659 &GpuDataManagerObserver::OnVideoMemoryUsageStatsUpdate, |
653 video_memory_usage_stats); | 660 video_memory_usage_stats); |
654 } | 661 } |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1244 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1251 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
1245 #if defined(OS_WIN) | 1252 #if defined(OS_WIN) |
1246 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1253 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
1247 #endif | 1254 #endif |
1248 complete_gpu_info_already_requested_ = true; | 1255 complete_gpu_info_already_requested_ = true; |
1249 // Some observers might be waiting. | 1256 // Some observers might be waiting. |
1250 NotifyGpuInfoUpdate(); | 1257 NotifyGpuInfoUpdate(); |
1251 } | 1258 } |
1252 | 1259 |
1253 } // namespace content | 1260 } // namespace content |
OLD | NEW |