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