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 14 matching lines...) Expand all Loading... |
25 #include "content/public/common/content_constants.h" | 25 #include "content/public/common/content_constants.h" |
26 #include "content/public/common/content_switches.h" | 26 #include "content/public/common/content_switches.h" |
27 #include "content/public/common/web_preferences.h" | 27 #include "content/public/common/web_preferences.h" |
28 #include "gpu/command_buffer/service/gpu_switches.h" | 28 #include "gpu/command_buffer/service/gpu_switches.h" |
29 #include "gpu/config/gpu_control_list_jsons.h" | 29 #include "gpu/config/gpu_control_list_jsons.h" |
30 #include "gpu/config/gpu_driver_bug_workaround_type.h" | 30 #include "gpu/config/gpu_driver_bug_workaround_type.h" |
31 #include "gpu/config/gpu_feature_type.h" | 31 #include "gpu/config/gpu_feature_type.h" |
32 #include "gpu/config/gpu_info_collector.h" | 32 #include "gpu/config/gpu_info_collector.h" |
33 #include "gpu/config/gpu_switches.h" | 33 #include "gpu/config/gpu_switches.h" |
34 #include "gpu/config/gpu_util.h" | 34 #include "gpu/config/gpu_util.h" |
| 35 #include "gpu/ipc/common/memory_stats.h" |
35 #include "ui/base/ui_base_switches.h" | 36 #include "ui/base/ui_base_switches.h" |
36 #include "ui/gl/gl_implementation.h" | 37 #include "ui/gl/gl_implementation.h" |
37 #include "ui/gl/gl_switches.h" | 38 #include "ui/gl/gl_switches.h" |
38 #include "ui/gl/gpu_switching_manager.h" | 39 #include "ui/gl/gpu_switching_manager.h" |
39 | 40 |
40 #if defined(OS_MACOSX) | 41 #if defined(OS_MACOSX) |
41 #include <ApplicationServices/ApplicationServices.h> | 42 #include <ApplicationServices/ApplicationServices.h> |
42 #endif // OS_MACOSX | 43 #endif // OS_MACOSX |
43 #if defined(OS_WIN) | 44 #if defined(OS_WIN) |
44 #include "base/win/windows_version.h" | 45 #include "base/win/windows_version.h" |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 complete_gpu_info_already_requested_ = true; | 638 complete_gpu_info_already_requested_ = true; |
638 } else if (was_info_available) { | 639 } else if (was_info_available) { |
639 // Allow future requests to go through properly. | 640 // Allow future requests to go through properly. |
640 complete_gpu_info_already_requested_ = false; | 641 complete_gpu_info_already_requested_ = false; |
641 } | 642 } |
642 | 643 |
643 UpdateGpuInfoHelper(); | 644 UpdateGpuInfoHelper(); |
644 } | 645 } |
645 | 646 |
646 void GpuDataManagerImplPrivate::UpdateVideoMemoryUsageStats( | 647 void GpuDataManagerImplPrivate::UpdateVideoMemoryUsageStats( |
647 const GPUVideoMemoryUsageStats& video_memory_usage_stats) { | 648 const gpu::VideoMemoryUsageStats& video_memory_usage_stats) { |
648 GpuDataManagerImpl::UnlockedSession session(owner_); | 649 GpuDataManagerImpl::UnlockedSession session(owner_); |
649 observer_list_->Notify(FROM_HERE, | 650 observer_list_->Notify(FROM_HERE, |
650 &GpuDataManagerObserver::OnVideoMemoryUsageStatsUpdate, | 651 &GpuDataManagerObserver::OnVideoMemoryUsageStatsUpdate, |
651 video_memory_usage_stats); | 652 video_memory_usage_stats); |
652 } | 653 } |
653 | 654 |
654 void GpuDataManagerImplPrivate::AppendRendererCommandLine( | 655 void GpuDataManagerImplPrivate::AppendRendererCommandLine( |
655 base::CommandLine* command_line) const { | 656 base::CommandLine* command_line) const { |
656 DCHECK(command_line); | 657 DCHECK(command_line); |
657 | 658 |
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1239 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; | 1240 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; |
1240 #if defined(OS_WIN) | 1241 #if defined(OS_WIN) |
1241 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; | 1242 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; |
1242 #endif | 1243 #endif |
1243 complete_gpu_info_already_requested_ = true; | 1244 complete_gpu_info_already_requested_ = true; |
1244 // Some observers might be waiting. | 1245 // Some observers might be waiting. |
1245 NotifyGpuInfoUpdate(); | 1246 NotifyGpuInfoUpdate(); |
1246 } | 1247 } |
1247 | 1248 |
1248 } // namespace content | 1249 } // namespace content |
OLD | NEW |