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 <stdint.h> | 7 #include <stdint.h> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 ComponentUpdateService* cus_; | 210 ComponentUpdateService* cus_; |
211 }; | 211 }; |
212 | 212 |
213 UpdateChecker::UpdateChecker(ComponentUpdateService* cus) : cus_(cus) { | 213 UpdateChecker::UpdateChecker(ComponentUpdateService* cus) : cus_(cus) { |
214 } | 214 } |
215 | 215 |
216 void UpdateChecker::OnGpuInfoUpdate() { | 216 void UpdateChecker::OnGpuInfoUpdate() { |
217 GpuDataManager* gpu_data_manager = GpuDataManager::GetInstance(); | 217 GpuDataManager* gpu_data_manager = GpuDataManager::GetInstance(); |
218 | 218 |
219 if (!gpu_data_manager->GpuAccessAllowed(NULL) || | 219 if (!gpu_data_manager->GpuAccessAllowed(NULL) || |
220 gpu_data_manager->IsFeatureBlacklisted(gpu::GPU_FEATURE_TYPE_WEBGL) || | 220 gpu_data_manager->IsFeatureBlacklisted( |
| 221 gpu::GPU_FEATURE_TYPE_ACCELERATED_WEBGL) || |
221 gpu_data_manager->ShouldUseSwiftShader()) { | 222 gpu_data_manager->ShouldUseSwiftShader()) { |
222 gpu_data_manager->RemoveObserver(this); | 223 gpu_data_manager->RemoveObserver(this); |
223 DCHECK_CURRENTLY_ON(BrowserThread::FILE); | 224 DCHECK_CURRENTLY_ON(BrowserThread::FILE); |
224 base::FilePath path = GetSwiftShaderBaseDirectory(); | 225 base::FilePath path = GetSwiftShaderBaseDirectory(); |
225 | 226 |
226 base::Version version(kNullVersion); | 227 base::Version version(kNullVersion); |
227 GetLatestSwiftShaderDirectory(&path, &version, NULL); | 228 GetLatestSwiftShaderDirectory(&path, &version, NULL); |
228 | 229 |
229 BrowserThread::PostTask( | 230 BrowserThread::PostTask( |
230 BrowserThread::UI, | 231 BrowserThread::UI, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 275 |
275 void RegisterSwiftShaderComponent(ComponentUpdateService* cus) { | 276 void RegisterSwiftShaderComponent(ComponentUpdateService* cus) { |
276 #if BUILDFLAG(ENABLE_SWIFTSHADER) && defined(ARCH_CPU_X86) | 277 #if BUILDFLAG(ENABLE_SWIFTSHADER) && defined(ARCH_CPU_X86) |
277 BrowserThread::PostTask(BrowserThread::FILE, | 278 BrowserThread::PostTask(BrowserThread::FILE, |
278 FROM_HERE, | 279 FROM_HERE, |
279 base::Bind(&RegisterSwiftShaderPath, cus)); | 280 base::Bind(&RegisterSwiftShaderPath, cus)); |
280 #endif | 281 #endif |
281 } | 282 } |
282 | 283 |
283 } // namespace component_updater | 284 } // namespace component_updater |
OLD | NEW |