OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/component_updater/swiftshader_component_installer.h" | 5 #include "chrome/browser/component_updater/swiftshader_component_installer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/base_paths.h" | 8 #include "base/base_paths.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/cpu.h" | 10 #include "base/cpu.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 if (cus->RegisterComponent(swiftshader) != ComponentUpdateService::kOk) { | 158 if (cus->RegisterComponent(swiftshader) != ComponentUpdateService::kOk) { |
159 NOTREACHED() << "SwiftShader component registration fail"; | 159 NOTREACHED() << "SwiftShader component registration fail"; |
160 } | 160 } |
161 } | 161 } |
162 | 162 |
163 class UpdateChecker : public content::GpuDataManagerObserver { | 163 class UpdateChecker : public content::GpuDataManagerObserver { |
164 public: | 164 public: |
165 explicit UpdateChecker(ComponentUpdateService* cus); | 165 explicit UpdateChecker(ComponentUpdateService* cus); |
166 | 166 |
167 virtual void OnGpuInfoUpdate() OVERRIDE; | 167 virtual void OnGpuInfoUpdate() OVERRIDE; |
| 168 virtual void OnVidmemUsageStatsUpdate( |
| 169 const content::GPUVidmemUsageStats& vidmem_usage_stats) OVERRIDE {} |
168 | 170 |
169 private: | 171 private: |
170 ComponentUpdateService* cus_; | 172 ComponentUpdateService* cus_; |
171 }; | 173 }; |
172 | 174 |
173 UpdateChecker::UpdateChecker(ComponentUpdateService* cus) | 175 UpdateChecker::UpdateChecker(ComponentUpdateService* cus) |
174 : cus_(cus) { | 176 : cus_(cus) { |
175 } | 177 } |
176 | 178 |
177 void UpdateChecker::OnGpuInfoUpdate() { | 179 void UpdateChecker::OnGpuInfoUpdate() { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 void RegisterSwiftShaderComponent(ComponentUpdateService* cus) { | 229 void RegisterSwiftShaderComponent(ComponentUpdateService* cus) { |
228 #if defined(ENABLE_SWIFTSHADER) | 230 #if defined(ENABLE_SWIFTSHADER) |
229 base::CPU cpu; | 231 base::CPU cpu; |
230 | 232 |
231 if (!cpu.has_sse2()) | 233 if (!cpu.has_sse2()) |
232 return; | 234 return; |
233 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, | 235 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, |
234 base::Bind(&RegisterSwiftShaderPath, cus)); | 236 base::Bind(&RegisterSwiftShaderPath, cus)); |
235 #endif | 237 #endif |
236 } | 238 } |
OLD | NEW |