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

Side by Side Diff: chrome/browser/component_updater/swiftshader_component_installer.cc

Issue 2737983002: WebGL feature will only enabled when accelerated (Closed)
Patch Set: Formatting fix Created 3 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/webstore_private/webstore_private_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/webstore_private/webstore_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698