Skip to content

Commit

Permalink
Cleanup: Remove some unneeded SSE2 checks and unused code. (try 2)
Browse files Browse the repository at this point in the history
This is a resubmit of https://codereview.chromium.org/459603003 without
the media/ changes.

BUG=349320
TBR=cpu@chromium.org,senorblanco@chromium.org

Review URL: https://codereview.chromium.org/511773002

Cr-Commit-Position: refs/heads/master@{#292121}
  • Loading branch information
leizleiz authored and Commit bot committed Aug 27, 2014
1 parent 57901a0 commit f2e5463
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 50 deletions.
6 changes: 0 additions & 6 deletions chrome/app/chromium_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,6 @@ be available for now. -->
This computer will no longer receive Chromium updates because its hardware is no longer supported.
</message>
</if>
<if expr="is_win">
<!-- Windows non-SSE2 deprecation -->
<message name="IDS_WIN_SSE_OBSOLETE_NOW" desc="A message displayed on an at-launch infobar and About (Help) page warning the user that the computer they are using is no longer supported.">
This computer will no longer receive Chromium updates because its hardware is no longer supported.
</message>
</if>
<message name="IDS_ACCNAME_APP" desc="The accessible name for the app menu.">
Chromium
</message>
Expand Down
6 changes: 0 additions & 6 deletions chrome/app/google_chrome_strings.grd
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,6 @@ Chrome supports. -->
This computer will no longer receive Google Chrome updates because its hardware is no longer supported.
</message>
</if>
<if expr="is_win">
<!-- Windows non-SSE2 deprecation -->
<message name="IDS_WIN_SSE_OBSOLETE_NOW" desc="A message displayed on an at-launch infobar and About (Help) page warning the user that the computer they are using is no longer supported.">
This computer will no longer receive Google Chrome updates because its hardware is no longer supported.
</message>
</if>
<message name="IDS_ACCNAME_APP" desc="The accessible name for the app menu.">
Chrome
</message>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#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"
Expand Down Expand Up @@ -249,10 +248,6 @@ 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));
Expand Down
12 changes: 2 additions & 10 deletions chrome/browser/ui/startup/obsolete_system_infobar_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "chrome/browser/ui/startup/obsolete_system_infobar_delegate.h"

#include "base/cpu.h"
#include "chrome/browser/infobars/infobar_service.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/chromium_strings.h"
Expand All @@ -24,17 +23,12 @@ void ObsoleteSystemInfoBarDelegate::Create(InfoBarService* infobar_service) {
!ObsoleteSystemMac::Has32BitOnlyCPU()) {
return;
}
#elif defined(OS_WIN)
// On Windows we no longer support non-SSE2 machines since Chrome 35.
if (base::CPU().has_sse2())
return;
infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
scoped_ptr<ConfirmInfoBarDelegate>(new ObsoleteSystemInfoBarDelegate())));
#else
// No other platforms currently show this infobar.
return;
#endif

infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
scoped_ptr<ConfirmInfoBarDelegate>(new ObsoleteSystemInfoBarDelegate())));
}

ObsoleteSystemInfoBarDelegate::ObsoleteSystemInfoBarDelegate()
Expand All @@ -47,8 +41,6 @@ ObsoleteSystemInfoBarDelegate::~ObsoleteSystemInfoBarDelegate() {
base::string16 ObsoleteSystemInfoBarDelegate::GetMessageText() const {
#if defined(OS_MACOSX)
return ObsoleteSystemMac::LocalizedObsoleteSystemString();
#elif defined(OS_WIN)
return l10n_util::GetStringUTF16(IDS_WIN_SSE_OBSOLETE_NOW);
#else
return l10n_util::GetStringUTF16(IDS_SYSTEM_OBSOLETE_MESSAGE);
#endif
Expand Down
6 changes: 0 additions & 6 deletions chrome/browser/upgrade_detector_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "base/bind.h"
#include "base/build_time.h"
#include "base/command_line.h"
#include "base/cpu.h"
#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
Expand Down Expand Up @@ -404,11 +403,6 @@ bool UpgradeDetectorImpl::DetectOutdatedInstall() {
// Don't show the update bubbles to enterprise users (i.e., on a domain).
if (base::win::IsEnrolledToDomain())
return false;

// On Windows, we don't want to warn about outdated installs when the
// machine doesn't support SSE2, it's been deprecated starting with M35.
if (!base::CPU().has_sse2())
return false;
#endif
}

Expand Down
11 changes: 2 additions & 9 deletions chrome/common/chrome_content_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "chrome/common/chrome_content_client.h"

#include "base/command_line.h"
#include "base/cpu.h"
#include "base/debug/crash_logging.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
Expand Down Expand Up @@ -74,9 +73,9 @@ const char kPDFPluginMimeType[] = "application/pdf";
const char kPDFPluginExtension[] = "pdf";
const char kPDFPluginDescription[] = "Portable Document Format";
const char kPDFPluginPrintPreviewMimeType[] =
"application/x-google-chrome-print-preview-pdf";
"application/x-google-chrome-print-preview-pdf";
const char kPDFPluginOutOfProcessMimeType[] =
"application/x-google-chrome-pdf";
"application/x-google-chrome-pdf";
const uint32 kPDFPluginPermissions = ppapi::PERMISSION_PRIVATE |
ppapi::PERMISSION_DEV;

Expand Down Expand Up @@ -396,12 +395,6 @@ bool GetBundledPepperFlash(content::PepperPluginInfo* plugin) {
if (force_disable)
return false;

// For Linux ia32, Flapper requires SSE2.
#if defined(OS_LINUX) && defined(ARCH_CPU_X86)
if (!base::CPU().has_sse2())
return false;
#endif // ARCH_CPU_X86

base::FilePath flash_path;
if (!PathService::Get(chrome::FILE_PEPPER_FLASH_PLUGIN, &flash_path))
return false;
Expand Down
11 changes: 4 additions & 7 deletions skia/ext/convolver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -362,13 +362,10 @@ struct ConvolveProcs {

void SetupSIMD(ConvolveProcs *procs) {
#ifdef SIMD_SSE2
base::CPU cpu;
if (cpu.has_sse2()) {
procs->extra_horizontal_reads = 3;
procs->convolve_vertically = &ConvolveVertically_SSE2;
procs->convolve_4rows_horizontally = &Convolve4RowsHorizontally_SSE2;
procs->convolve_horizontally = &ConvolveHorizontally_SSE2;
}
procs->extra_horizontal_reads = 3;
procs->convolve_vertically = &ConvolveVertically_SSE2;
procs->convolve_4rows_horizontally = &Convolve4RowsHorizontally_SSE2;
procs->convolve_horizontally = &ConvolveHorizontally_SSE2;
#elif defined SIMD_MIPS_DSPR2
procs->extra_horizontal_reads = 3;
procs->convolve_vertically = &ConvolveVertically_mips_dspr2;
Expand Down
1 change: 0 additions & 1 deletion skia/ext/convolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <vector>

#include "base/basictypes.h"
#include "base/cpu.h"
#include "third_party/skia/include/core/SkSize.h"
#include "third_party/skia/include/core/SkTypes.h"

Expand Down

0 comments on commit f2e5463

Please sign in to comment.