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

Unified Diff: chrome/browser/component_updater/swiftshader_component_installer.cc

Issue 9791028: Disable SwiftShader when CPU doesn't have SSE2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/swiftshader_component_installer.cc
diff --git a/chrome/browser/component_updater/swiftshader_component_installer.cc b/chrome/browser/component_updater/swiftshader_component_installer.cc
index 03b9482839f05bd254b37c9bb5b2bd1de57b2b77..c482ab4d4619de4d265097d707c9af48f600ac55 100644
--- a/chrome/browser/component_updater/swiftshader_component_installer.cc
+++ b/chrome/browser/component_updater/swiftshader_component_installer.cc
@@ -7,6 +7,7 @@
#include "base/bind.h"
#include "base/base_paths.h"
#include "base/compiler_specific.h"
+#include "base/cpu.h"
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/logging.h"
@@ -211,6 +212,10 @@ void RegisterSwiftShaderPath(ComponentUpdateService* cus) {
void RegisterSwiftShaderComponent(ComponentUpdateService* cus) {
#if defined(ENABLE_SWIFTSHADER)
+ base::CPU cpu;
+
+ if (!cpu.has_sse2())
+ return;
BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
base::Bind(&RegisterSwiftShaderPath, cus));
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698