| 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.h" | 5 #include "content/browser/gpu/gpu_data_manager_impl.h" |
| 6 | 6 |
| 7 #include "content/browser/gpu/gpu_data_manager_impl_private.h" | 7 #include "content/browser/gpu/gpu_data_manager_impl_private.h" |
| 8 #include "gpu/ipc/common/memory_stats.h" | 8 #include "gpu/ipc/common/memory_stats.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 const std::string& gpu_blacklist_json, const gpu::GPUInfo& gpu_info) { | 23 const std::string& gpu_blacklist_json, const gpu::GPUInfo& gpu_info) { |
| 24 base::AutoLock auto_lock(lock_); | 24 base::AutoLock auto_lock(lock_); |
| 25 private_->InitializeForTesting(gpu_blacklist_json, gpu_info); | 25 private_->InitializeForTesting(gpu_blacklist_json, gpu_info); |
| 26 } | 26 } |
| 27 | 27 |
| 28 bool GpuDataManagerImpl::IsFeatureBlacklisted(int feature) const { | 28 bool GpuDataManagerImpl::IsFeatureBlacklisted(int feature) const { |
| 29 base::AutoLock auto_lock(lock_); | 29 base::AutoLock auto_lock(lock_); |
| 30 return private_->IsFeatureBlacklisted(feature); | 30 return private_->IsFeatureBlacklisted(feature); |
| 31 } | 31 } |
| 32 | 32 |
| 33 bool GpuDataManagerImpl::IsFeatureEnabled(int feature) const { |
| 34 base::AutoLock auto_lock(lock_); |
| 35 return private_->IsFeatureEnabled(feature); |
| 36 } |
| 37 |
| 33 bool GpuDataManagerImpl::IsDriverBugWorkaroundActive(int feature) const { | 38 bool GpuDataManagerImpl::IsDriverBugWorkaroundActive(int feature) const { |
| 34 base::AutoLock auto_lock(lock_); | 39 base::AutoLock auto_lock(lock_); |
| 35 return private_->IsDriverBugWorkaroundActive(feature); | 40 return private_->IsDriverBugWorkaroundActive(feature); |
| 36 } | 41 } |
| 37 | 42 |
| 38 gpu::GPUInfo GpuDataManagerImpl::GetGPUInfo() const { | 43 gpu::GPUInfo GpuDataManagerImpl::GetGPUInfo() const { |
| 39 base::AutoLock auto_lock(lock_); | 44 base::AutoLock auto_lock(lock_); |
| 40 return private_->GetGPUInfo(); | 45 return private_->GetGPUInfo(); |
| 41 } | 46 } |
| 42 | 47 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 void GpuDataManagerImpl::Initialize() { | 142 void GpuDataManagerImpl::Initialize() { |
| 138 base::AutoLock auto_lock(lock_); | 143 base::AutoLock auto_lock(lock_); |
| 139 private_->Initialize(); | 144 private_->Initialize(); |
| 140 } | 145 } |
| 141 | 146 |
| 142 void GpuDataManagerImpl::UpdateGpuInfo(const gpu::GPUInfo& gpu_info) { | 147 void GpuDataManagerImpl::UpdateGpuInfo(const gpu::GPUInfo& gpu_info) { |
| 143 base::AutoLock auto_lock(lock_); | 148 base::AutoLock auto_lock(lock_); |
| 144 private_->UpdateGpuInfo(gpu_info); | 149 private_->UpdateGpuInfo(gpu_info); |
| 145 } | 150 } |
| 146 | 151 |
| 152 void GpuDataManagerImpl::UpdateGpuFeatureStatus( |
| 153 const gpu::GPUFeatureStatus& gpu_feature_status) { |
| 154 base::AutoLock auto_lock(lock_); |
| 155 private_->UpdateGpuFeatureStatus(gpu_feature_status); |
| 156 } |
| 157 |
| 147 void GpuDataManagerImpl::UpdateVideoMemoryUsageStats( | 158 void GpuDataManagerImpl::UpdateVideoMemoryUsageStats( |
| 148 const gpu::VideoMemoryUsageStats& video_memory_usage_stats) { | 159 const gpu::VideoMemoryUsageStats& video_memory_usage_stats) { |
| 149 base::AutoLock auto_lock(lock_); | 160 base::AutoLock auto_lock(lock_); |
| 150 private_->UpdateVideoMemoryUsageStats(video_memory_usage_stats); | 161 private_->UpdateVideoMemoryUsageStats(video_memory_usage_stats); |
| 151 } | 162 } |
| 152 | 163 |
| 153 void GpuDataManagerImpl::AppendRendererCommandLine( | 164 void GpuDataManagerImpl::AppendRendererCommandLine( |
| 154 base::CommandLine* command_line) const { | 165 base::CommandLine* command_line) const { |
| 155 base::AutoLock auto_lock(lock_); | 166 base::AutoLock auto_lock(lock_); |
| 156 private_->AppendRendererCommandLine(command_line); | 167 private_->AppendRendererCommandLine(command_line); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 } | 269 } |
| 259 | 270 |
| 260 GpuDataManagerImpl::GpuDataManagerImpl() | 271 GpuDataManagerImpl::GpuDataManagerImpl() |
| 261 : private_(GpuDataManagerImplPrivate::Create(this)) { | 272 : private_(GpuDataManagerImplPrivate::Create(this)) { |
| 262 } | 273 } |
| 263 | 274 |
| 264 GpuDataManagerImpl::~GpuDataManagerImpl() { | 275 GpuDataManagerImpl::~GpuDataManagerImpl() { |
| 265 } | 276 } |
| 266 | 277 |
| 267 } // namespace content | 278 } // namespace content |
| OLD | NEW |