Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: content/browser/gpu/gpu_data_manager_impl_private.cc

Issue 1708783002: Mustash: move content::GPUVideoMemoryUsageStats to gpu::VideoMemoryUsageStats (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 15 matching lines...) Expand all
26 #include "content/public/common/content_constants.h" 26 #include "content/public/common/content_constants.h"
27 #include "content/public/common/content_switches.h" 27 #include "content/public/common/content_switches.h"
28 #include "content/public/common/web_preferences.h" 28 #include "content/public/common/web_preferences.h"
29 #include "gpu/command_buffer/service/gpu_switches.h" 29 #include "gpu/command_buffer/service/gpu_switches.h"
30 #include "gpu/config/gpu_control_list_jsons.h" 30 #include "gpu/config/gpu_control_list_jsons.h"
31 #include "gpu/config/gpu_driver_bug_workaround_type.h" 31 #include "gpu/config/gpu_driver_bug_workaround_type.h"
32 #include "gpu/config/gpu_feature_type.h" 32 #include "gpu/config/gpu_feature_type.h"
33 #include "gpu/config/gpu_info_collector.h" 33 #include "gpu/config/gpu_info_collector.h"
34 #include "gpu/config/gpu_switches.h" 34 #include "gpu/config/gpu_switches.h"
35 #include "gpu/config/gpu_util.h" 35 #include "gpu/config/gpu_util.h"
36 #include "gpu/ipc/common/memory_stats.h"
36 #include "ui/base/ui_base_switches.h" 37 #include "ui/base/ui_base_switches.h"
37 #include "ui/gl/gl_implementation.h" 38 #include "ui/gl/gl_implementation.h"
38 #include "ui/gl/gl_switches.h" 39 #include "ui/gl/gl_switches.h"
39 #include "ui/gl/gpu_switching_manager.h" 40 #include "ui/gl/gpu_switching_manager.h"
40 41
41 #if defined(OS_MACOSX) 42 #if defined(OS_MACOSX)
42 #include <ApplicationServices/ApplicationServices.h> 43 #include <ApplicationServices/ApplicationServices.h>
43 #endif // OS_MACOSX 44 #endif // OS_MACOSX
44 #if defined(OS_WIN) 45 #if defined(OS_WIN)
45 #include "base/win/windows_version.h" 46 #include "base/win/windows_version.h"
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 complete_gpu_info_already_requested_ = true; 637 complete_gpu_info_already_requested_ = true;
637 } else if (was_info_available) { 638 } else if (was_info_available) {
638 // Allow future requests to go through properly. 639 // Allow future requests to go through properly.
639 complete_gpu_info_already_requested_ = false; 640 complete_gpu_info_already_requested_ = false;
640 } 641 }
641 642
642 UpdateGpuInfoHelper(); 643 UpdateGpuInfoHelper();
643 } 644 }
644 645
645 void GpuDataManagerImplPrivate::UpdateVideoMemoryUsageStats( 646 void GpuDataManagerImplPrivate::UpdateVideoMemoryUsageStats(
646 const GPUVideoMemoryUsageStats& video_memory_usage_stats) { 647 const gpu::VideoMemoryUsageStats& video_memory_usage_stats) {
647 GpuDataManagerImpl::UnlockedSession session(owner_); 648 GpuDataManagerImpl::UnlockedSession session(owner_);
648 observer_list_->Notify(FROM_HERE, 649 observer_list_->Notify(FROM_HERE,
649 &GpuDataManagerObserver::OnVideoMemoryUsageStatsUpdate, 650 &GpuDataManagerObserver::OnVideoMemoryUsageStatsUpdate,
650 video_memory_usage_stats); 651 video_memory_usage_stats);
651 } 652 }
652 653
653 void GpuDataManagerImplPrivate::AppendRendererCommandLine( 654 void GpuDataManagerImplPrivate::AppendRendererCommandLine(
654 base::CommandLine* command_line) const { 655 base::CommandLine* command_line) const {
655 DCHECK(command_line); 656 DCHECK(command_line);
656 657
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure; 1238 gpu_info_.context_info_state = gpu::kCollectInfoFatalFailure;
1238 #if defined(OS_WIN) 1239 #if defined(OS_WIN)
1239 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure; 1240 gpu_info_.dx_diagnostics_info_state = gpu::kCollectInfoFatalFailure;
1240 #endif 1241 #endif
1241 complete_gpu_info_already_requested_ = true; 1242 complete_gpu_info_already_requested_ = true;
1242 // Some observers might be waiting. 1243 // Some observers might be waiting.
1243 NotifyGpuInfoUpdate(); 1244 NotifyGpuInfoUpdate();
1244 } 1245 }
1245 1246
1246 } // namespace content 1247 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl_private.h ('k') | content/browser/gpu/gpu_data_manager_impl_private_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698