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

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

Issue 513663002: Revert of Cleanup: Remove unneeded SSE2 checks and unused code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « chrome/app/google_chrome_strings.grd ('k') | chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc » ('j') | 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 16b83945970c969ebb731ba88ac3acb8436ed1e5..a1c095234b366f531a17398f305ec16aaf655b88 100644
--- a/chrome/browser/component_updater/swiftshader_component_installer.cc
+++ b/chrome/browser/component_updater/swiftshader_component_installer.cc
@@ -10,6 +10,7 @@
#include "base/base_paths.h"
#include "base/bind.h"
#include "base/compiler_specific.h"
+#include "base/cpu.h"
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
@@ -248,6 +249,10 @@
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));
« no previous file with comments | « chrome/app/google_chrome_strings.grd ('k') | chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698