| 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 | 9 |
| 9 namespace content { | 10 namespace content { |
| 10 | 11 |
| 11 // static | 12 // static |
| 12 GpuDataManager* GpuDataManager::GetInstance() { | 13 GpuDataManager* GpuDataManager::GetInstance() { |
| 13 return GpuDataManagerImpl::GetInstance(); | 14 return GpuDataManagerImpl::GetInstance(); |
| 14 } | 15 } |
| 15 | 16 |
| 16 // static | 17 // static |
| 17 GpuDataManagerImpl* GpuDataManagerImpl::GetInstance() { | 18 GpuDataManagerImpl* GpuDataManagerImpl::GetInstance() { |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 base::AutoLock auto_lock(lock_); | 138 base::AutoLock auto_lock(lock_); |
| 138 private_->Initialize(); | 139 private_->Initialize(); |
| 139 } | 140 } |
| 140 | 141 |
| 141 void GpuDataManagerImpl::UpdateGpuInfo(const gpu::GPUInfo& gpu_info) { | 142 void GpuDataManagerImpl::UpdateGpuInfo(const gpu::GPUInfo& gpu_info) { |
| 142 base::AutoLock auto_lock(lock_); | 143 base::AutoLock auto_lock(lock_); |
| 143 private_->UpdateGpuInfo(gpu_info); | 144 private_->UpdateGpuInfo(gpu_info); |
| 144 } | 145 } |
| 145 | 146 |
| 146 void GpuDataManagerImpl::UpdateVideoMemoryUsageStats( | 147 void GpuDataManagerImpl::UpdateVideoMemoryUsageStats( |
| 147 const GPUVideoMemoryUsageStats& video_memory_usage_stats) { | 148 const gpu::VideoMemoryUsageStats& video_memory_usage_stats) { |
| 148 base::AutoLock auto_lock(lock_); | 149 base::AutoLock auto_lock(lock_); |
| 149 private_->UpdateVideoMemoryUsageStats(video_memory_usage_stats); | 150 private_->UpdateVideoMemoryUsageStats(video_memory_usage_stats); |
| 150 } | 151 } |
| 151 | 152 |
| 152 void GpuDataManagerImpl::AppendRendererCommandLine( | 153 void GpuDataManagerImpl::AppendRendererCommandLine( |
| 153 base::CommandLine* command_line) const { | 154 base::CommandLine* command_line) const { |
| 154 base::AutoLock auto_lock(lock_); | 155 base::AutoLock auto_lock(lock_); |
| 155 private_->AppendRendererCommandLine(command_line); | 156 private_->AppendRendererCommandLine(command_line); |
| 156 } | 157 } |
| 157 | 158 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 } | 273 } |
| 273 | 274 |
| 274 GpuDataManagerImpl::GpuDataManagerImpl() | 275 GpuDataManagerImpl::GpuDataManagerImpl() |
| 275 : private_(GpuDataManagerImplPrivate::Create(this)) { | 276 : private_(GpuDataManagerImplPrivate::Create(this)) { |
| 276 } | 277 } |
| 277 | 278 |
| 278 GpuDataManagerImpl::~GpuDataManagerImpl() { | 279 GpuDataManagerImpl::~GpuDataManagerImpl() { |
| 279 } | 280 } |
| 280 | 281 |
| 281 } // namespace content | 282 } // namespace content |
| OLD | NEW |