Commit 55234498 authored by thestig's avatar thestig Committed by Commit bot

Revert of Cleanup: Remove unneeded SSE2 checks and unused code. (patchset #4...

Revert of Cleanup: Remove unneeded SSE2 checks and unused code. (patchset #4 of https://codereview.chromium.org/459603003/)

Reason for revert:
Passed the win x64 trybot, but failed on the win 64 builder.

Original issue's description:
> Cleanup: Remove unneeded SSE2 checks and unused code.
>
> BUG=349320
>
> Committed: https://chromium.googlesource.com/chromium/src/+/b2cd99b39c3744f61231f8818f6c7a3d2881f0f0

TBR=cpu@chromium.org,dalecurtis@chromium.org,senorblanco@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=349320

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

Cr-Commit-Position: refs/heads/master@{#292101}
parent 17e71b79
......@@ -329,6 +329,12 @@ 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>
......
......@@ -252,6 +252,12 @@ 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>
......
......@@ -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 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));
......
......@@ -4,6 +4,7 @@
#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"
......@@ -23,12 +24,17 @@ void ObsoleteSystemInfoBarDelegate::Create(InfoBarService* infobar_service) {
!ObsoleteSystemMac::Has32BitOnlyCPU()) {
return;
}
infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
scoped_ptr<ConfirmInfoBarDelegate>(new ObsoleteSystemInfoBarDelegate())));
#elif defined(OS_WIN)
// On Windows we no longer support non-SSE2 machines since Chrome 35.
if (base::CPU().has_sse2())
return;
#else
// No other platforms currently show this infobar.
return;
#endif
infobar_service->AddInfoBar(ConfirmInfoBarDelegate::CreateInfoBar(
scoped_ptr<ConfirmInfoBarDelegate>(new ObsoleteSystemInfoBarDelegate())));
}
ObsoleteSystemInfoBarDelegate::ObsoleteSystemInfoBarDelegate()
......@@ -41,6 +47,8 @@ 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
......
......@@ -9,6 +9,7 @@
#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"
......@@ -403,6 +404,11 @@ 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
}
......
......@@ -5,6 +5,7 @@
#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"
......@@ -73,9 +74,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;
......@@ -395,6 +396,12 @@ 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;
......
......@@ -375,6 +375,7 @@ if (cpu_arch == "x86" || cpu_arch == "x64") {
yasm_assemble("media_yasm") {
sources = [
"simd/convert_rgb_to_yuv_ssse3.asm",
"simd/convert_yuv_to_rgb_mmx.asm",
"simd/convert_yuv_to_rgb_sse.asm",
"simd/convert_yuva_to_argb_mmx.asm",
"simd/empty_register_state_mmx.asm",
......
......@@ -63,6 +63,17 @@ MEDIA_EXPORT void ConvertYUVToRGB32_SSE(const uint8* yplane,
int rgbstride,
YUVType yuv_type);
MEDIA_EXPORT void ConvertYUVToRGB32_MMX(const uint8* yplane,
const uint8* uplane,
const uint8* vplane,
uint8* rgbframe,
int width,
int height,
int ystride,
int uvstride,
int rgbstride,
YUVType yuv_type);
MEDIA_EXPORT void ConvertYUVAToARGB_MMX(const uint8* yplane,
const uint8* uplane,
const uint8* vplane,
......@@ -115,6 +126,13 @@ extern "C" {
// issue on at least Win64. The C-equivalent RowProc versions' prototypes
// include the same change to ptrdiff_t to reuse the typedefs.
MEDIA_EXPORT void ConvertYUVToRGB32Row_MMX(const uint8* yplane,
const uint8* uplane,
const uint8* vplane,
uint8* rgbframe,
ptrdiff_t width,
const int16 convert_table[1024][4]);
MEDIA_EXPORT void ConvertYUVAToARGBRow_MMX(const uint8* yplane,
const uint8* uplane,
const uint8* vplane,
......@@ -130,6 +148,14 @@ MEDIA_EXPORT void ConvertYUVToRGB32Row_SSE(const uint8* yplane,
ptrdiff_t width,
const int16 convert_table[1024][4]);
MEDIA_EXPORT void ScaleYUVToRGB32Row_MMX(const uint8* y_buf,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
ptrdiff_t width,
ptrdiff_t source_dx,
const int16 convert_table[1024][4]);
MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE(const uint8* y_buf,
const uint8* u_buf,
const uint8* v_buf,
......@@ -147,6 +173,15 @@ MEDIA_EXPORT void ScaleYUVToRGB32Row_SSE2_X64(
ptrdiff_t source_dx,
const int16 convert_table[1024][4]);
MEDIA_EXPORT void LinearScaleYUVToRGB32Row_MMX(
const uint8* y_buf,
const uint8* u_buf,
const uint8* v_buf,
uint8* rgb_buf,
ptrdiff_t width,
ptrdiff_t source_dx,
const int16 convert_table[1024][4]);
MEDIA_EXPORT void LinearScaleYUVToRGB32Row_SSE(
const uint8* y_buf,
const uint8* u_buf,
......
; Copyright (c) 2011 The Chromium Authors. All rights reserved.
; Use of this source code is governed by a BSD-style license that can be
; found in the LICENSE file.
%include "third_party/x86inc/x86inc.asm"
;
; This file uses MMX instructions.
;
SECTION_TEXT
CPU MMX
; Use movq to save the output.
%define MOVQ movq
; extern "C" void ConvertYUVToRGB32Row_MMX(const uint8* y_buf,
; const uint8* u_buf,
; const uint8* v_buf,
; uint8* rgb_buf,
; ptrdiff_t width,
; const int16 convert_table[1024][4]);
%define SYMBOL ConvertYUVToRGB32Row_MMX
%include "convert_yuv_to_rgb_mmx.inc"
......@@ -14,6 +14,34 @@
namespace media {
void ConvertYUVToRGB32_MMX(const uint8* yplane,
const uint8* uplane,
const uint8* vplane,
uint8* rgbframe,
int width,
int height,
int ystride,
int uvstride,
int rgbstride,
YUVType yuv_type) {
unsigned int y_shift = GetVerticalShift(yuv_type);
for (int y = 0; y < height; ++y) {
uint8* rgb_row = rgbframe + y * rgbstride;
const uint8* y_ptr = yplane + y * ystride;
const uint8* u_ptr = uplane + (y >> y_shift) * uvstride;
const uint8* v_ptr = vplane + (y >> y_shift) * uvstride;
ConvertYUVToRGB32Row_MMX(y_ptr,
u_ptr,
v_ptr,
rgb_row,
width,
GetLookupTable(yuv_type));
}
EmptyRegisterState();
}
void ConvertYUVAToARGB_MMX(const uint8* yplane,
const uint8* uplane,
const uint8* vplane,
......
......@@ -165,33 +165,42 @@ void InitializeCPUSpecificYUVConversions() {
// Assembly code confuses MemorySanitizer.
#if defined(ARCH_CPU_X86_FAMILY) && !defined(MEMORY_SANITIZER)
base::CPU cpu;
g_convert_yuva_to_argb_proc_ = ConvertYUVAToARGB_MMX;
if (cpu.has_mmx()) {
g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_MMX;
g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_MMX;
g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_MMX;
g_convert_yuva_to_argb_proc_ = ConvertYUVAToARGB_MMX;
g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX;
#if defined(MEDIA_MMX_INTRINSICS_AVAILABLE)
g_filter_yuv_rows_proc_ = FilterYUVRows_MMX;
g_empty_register_state_proc_ = EmptyRegisterStateIntrinsic;
g_filter_yuv_rows_proc_ = FilterYUVRows_MMX;
g_empty_register_state_proc_ = EmptyRegisterStateIntrinsic;
#else
g_empty_register_state_proc_ = EmptyRegisterState_MMX;
g_empty_register_state_proc_ = EmptyRegisterState_MMX;
#endif
}
g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_SSE;
g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE;
g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_SSE;
g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_SSE;
if (cpu.has_sse()) {
g_convert_yuv_to_rgb32_row_proc_ = ConvertYUVToRGB32Row_SSE;
g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE;
g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_SSE;
g_convert_yuv_to_rgb32_proc_ = ConvertYUVToRGB32_SSE;
}
g_filter_yuv_rows_proc_ = FilterYUVRows_SSE2;
g_convert_rgb32_to_yuv_proc_ = ConvertRGB32ToYUV_SSE2;
if (cpu.has_sse2()) {
g_filter_yuv_rows_proc_ = FilterYUVRows_SSE2;
g_convert_rgb32_to_yuv_proc_ = ConvertRGB32ToYUV_SSE2;
#if defined(ARCH_CPU_X86_64)
g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE2_X64;
g_scale_yuv_to_rgb32_row_proc_ = ScaleYUVToRGB32Row_SSE2_X64;
// Technically this should be in the MMX section, but MSVC will optimize out
// the export of LinearScaleYUVToRGB32Row_MMX, which is required by the unit
// tests, if that decision can be made at compile time. Since all X64 CPUs
// have SSE2, we can hack around this by making the selection here.
g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX_X64;
// Technically this should be in the MMX section, but MSVC will optimize out
// the export of LinearScaleYUVToRGB32Row_MMX, which is required by the unit
// tests, if that decision can be made at compile time. Since all X64 CPUs
// have SSE2, we can hack around this by making the selection here.
g_linear_scale_yuv_to_rgb32_row_proc_ = LinearScaleYUVToRGB32Row_MMX_X64;
#endif
}
if (cpu.has_ssse3()) {
g_convert_rgb24_to_yuv_proc_ = &ConvertRGB24ToYUV_SSSE3;
......
......@@ -64,6 +64,31 @@ class YUVConvertPerfTest : public testing::Test {
DISALLOW_COPY_AND_ASSIGN(YUVConvertPerfTest);
};
TEST_F(YUVConvertPerfTest, ConvertYUVToRGB32Row_MMX) {
ASSERT_TRUE(base::CPU().has_mmx());
base::TimeTicks start = base::TimeTicks::HighResNow();
for (int i = 0; i < kPerfTestIterations; ++i) {
for (int row = 0; row < kSourceHeight; ++row) {
int chroma_row = row / 2;
ConvertYUVToRGB32Row_MMX(
yuv_bytes_.get() + row * kSourceWidth,
yuv_bytes_.get() + kSourceUOffset + (chroma_row * kSourceWidth / 2),
yuv_bytes_.get() + kSourceVOffset + (chroma_row * kSourceWidth / 2),
rgb_bytes_converted_.get(),
kWidth,
GetLookupTable(YV12));
}
}
double total_time_seconds =
(base::TimeTicks::HighResNow() - start).InSecondsF();
perf_test::PrintResult(
"yuv_convert_perftest", "", "ConvertYUVToRGB32Row_MMX",
kPerfTestIterations / total_time_seconds, "runs/s", true);
media::EmptyRegisterState();
}
TEST_F(YUVConvertPerfTest, ConvertYUVToRGB32Row_SSE) {
ASSERT_TRUE(base::CPU().has_sse());
......@@ -88,6 +113,33 @@ TEST_F(YUVConvertPerfTest, ConvertYUVToRGB32Row_SSE) {
media::EmptyRegisterState();
}
TEST_F(YUVConvertPerfTest, ScaleYUVToRGB32Row_MMX) {
ASSERT_TRUE(base::CPU().has_mmx());
const int kSourceDx = 80000; // This value means a scale down.
base::TimeTicks start = base::TimeTicks::HighResNow();
for (int i = 0; i < kPerfTestIterations; ++i) {
for (int row = 0; row < kSourceHeight; ++row) {
int chroma_row = row / 2;
ScaleYUVToRGB32Row_MMX(
yuv_bytes_.get() + row * kSourceWidth,
yuv_bytes_.get() + kSourceUOffset + (chroma_row * kSourceWidth / 2),
yuv_bytes_.get() + kSourceVOffset + (chroma_row * kSourceWidth / 2),
rgb_bytes_converted_.get(),
kWidth,
kSourceDx,
GetLookupTable(YV12));
}
}
double total_time_seconds =
(base::TimeTicks::HighResNow() - start).InSecondsF();
perf_test::PrintResult(
"yuv_convert_perftest", "", "ScaleYUVToRGB32Row_MMX",
kPerfTestIterations / total_time_seconds, "runs/s", true);
media::EmptyRegisterState();
}
TEST_F(YUVConvertPerfTest, ScaleYUVToRGB32Row_SSE) {
ASSERT_TRUE(base::CPU().has_sse());
......@@ -115,6 +167,33 @@ TEST_F(YUVConvertPerfTest, ScaleYUVToRGB32Row_SSE) {
media::EmptyRegisterState();
}
TEST_F(YUVConvertPerfTest, LinearScaleYUVToRGB32Row_MMX) {
ASSERT_TRUE(base::CPU().has_mmx());
const int kSourceDx = 80000; // This value means a scale down.
base::TimeTicks start = base::TimeTicks::HighResNow();
for (int i = 0; i < kPerfTestIterations; ++i) {
for (int row = 0; row < kSourceHeight; ++row) {
int chroma_row = row / 2;
LinearScaleYUVToRGB32Row_MMX(
yuv_bytes_.get() + row * kSourceWidth,
yuv_bytes_.get() + kSourceUOffset + (chroma_row * kSourceWidth / 2),
yuv_bytes_.get() + kSourceVOffset + (chroma_row * kSourceWidth / 2),
rgb_bytes_converted_.get(),
kWidth,
kSourceDx,
GetLookupTable(YV12));
}
}
double total_time_seconds =
(base::TimeTicks::HighResNow() - start).InSecondsF();
perf_test::PrintResult(
"yuv_convert_perftest", "", "LinearScaleYUVToRGB32Row_MMX",
kPerfTestIterations / total_time_seconds, "runs/s", true);
media::EmptyRegisterState();
}
TEST_F(YUVConvertPerfTest, LinearScaleYUVToRGB32Row_SSE) {
ASSERT_TRUE(base::CPU().has_sse());
......
......@@ -657,6 +657,37 @@ TEST(YUVConvertTest, RGB32ToYUV_SSE2_MatchReference) {
EXPECT_EQ(0, error);
}
TEST(YUVConvertTest, ConvertYUVToRGB32Row_MMX) {
base::CPU cpu;
if (!cpu.has_mmx()) {
LOG(WARNING) << "System not supported. Test skipped.";
return;
}
scoped_ptr<uint8[]> yuv_bytes(new uint8[kYUV12Size]);
scoped_ptr<uint8[]> rgb_bytes_reference(new uint8[kRGBSize]);
scoped_ptr<uint8[]> rgb_bytes_converted(new uint8[kRGBSize]);
ReadYV12Data(&yuv_bytes);
const int kWidth = 167;
ConvertYUVToRGB32Row_C(yuv_bytes.get(),
yuv_bytes.get() + kSourceUOffset,
yuv_bytes.get() + kSourceVOffset,
rgb_bytes_reference.get(),
kWidth,
GetLookupTable(YV12));
ConvertYUVToRGB32Row_MMX(yuv_bytes.get(),
yuv_bytes.get() + kSourceUOffset,
yuv_bytes.get() + kSourceVOffset,
rgb_bytes_converted.get(),
kWidth,
GetLookupTable(YV12));
media::EmptyRegisterState();
EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(),
rgb_bytes_converted.get(),
kWidth * kBpp));
}
TEST(YUVConvertTest, ConvertYUVToRGB32Row_SSE) {
base::CPU cpu;
if (!cpu.has_sse()) {
......@@ -688,6 +719,40 @@ TEST(YUVConvertTest, ConvertYUVToRGB32Row_SSE) {
kWidth * kBpp));
}
TEST(YUVConvertTest, ScaleYUVToRGB32Row_MMX) {
base::CPU cpu;
if (!cpu.has_mmx()) {
LOG(WARNING) << "System not supported. Test skipped.";
return;
}
scoped_ptr<uint8[]> yuv_bytes(new uint8[kYUV12Size]);
scoped_ptr<uint8[]> rgb_bytes_reference(new uint8[kRGBSize]);
scoped_ptr<uint8[]> rgb_bytes_converted(new uint8[kRGBSize]);
ReadYV12Data(&yuv_bytes);
const int kWidth = 167;
const int kSourceDx = 80000; // This value means a scale down.
ScaleYUVToRGB32Row_C(yuv_bytes.get(),
yuv_bytes.get() + kSourceUOffset,
yuv_bytes.get() + kSourceVOffset,
rgb_bytes_reference.get(),
kWidth,
kSourceDx,
GetLookupTable(YV12));
ScaleYUVToRGB32Row_MMX(yuv_bytes.get(),
yuv_bytes.get() + kSourceUOffset,
yuv_bytes.get() + kSourceVOffset,
rgb_bytes_converted.get(),
kWidth,
kSourceDx,
GetLookupTable(YV12));
media::EmptyRegisterState();
EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(),
rgb_bytes_converted.get(),
kWidth * kBpp));
}
TEST(YUVConvertTest, ScaleYUVToRGB32Row_SSE) {
base::CPU cpu;
if (!cpu.has_sse()) {
......@@ -722,6 +787,40 @@ TEST(YUVConvertTest, ScaleYUVToRGB32Row_SSE) {
kWidth * kBpp));
}
TEST(YUVConvertTest, LinearScaleYUVToRGB32Row_MMX) {
base::CPU cpu;
if (!cpu.has_mmx()) {
LOG(WARNING) << "System not supported. Test skipped.";
return;
}
scoped_ptr<uint8[]> yuv_bytes(new uint8[kYUV12Size]);
scoped_ptr<uint8[]> rgb_bytes_reference(new uint8[kRGBSize]);
scoped_ptr<uint8[]> rgb_bytes_converted(new uint8[kRGBSize]);
ReadYV12Data(&yuv_bytes);
const int kWidth = 167;
const int kSourceDx = 80000; // This value means a scale down.
LinearScaleYUVToRGB32Row_C(yuv_bytes.get(),
yuv_bytes.get() + kSourceUOffset,
yuv_bytes.get() + kSourceVOffset,
rgb_bytes_reference.get(),
kWidth,
kSourceDx,
GetLookupTable(YV12));
LinearScaleYUVToRGB32Row_MMX(yuv_bytes.get(),
yuv_bytes.get() + kSourceUOffset,
yuv_bytes.get() + kSourceVOffset,
rgb_bytes_converted.get(),
kWidth,
kSourceDx,
GetLookupTable(YV12));
media::EmptyRegisterState();
EXPECT_EQ(0, memcmp(rgb_bytes_reference.get(),
rgb_bytes_converted.get(),
kWidth * kBpp));
}
TEST(YUVConvertTest, LinearScaleYUVToRGB32Row_SSE) {
base::CPU cpu;
if (!cpu.has_sse()) {
......
......@@ -1413,6 +1413,7 @@
'type': 'static_library',
'sources': [
'base/simd/convert_rgb_to_yuv_ssse3.asm',
'base/simd/convert_yuv_to_rgb_mmx.asm',
'base/simd/convert_yuv_to_rgb_sse.asm',
'base/simd/convert_yuva_to_argb_mmx.asm',
'base/simd/empty_register_state_mmx.asm',
......
......@@ -362,10 +362,13 @@ struct ConvolveProcs {
void SetupSIMD(ConvolveProcs *procs) {
#ifdef SIMD_SSE2
procs->extra_horizontal_reads = 3;
procs->convolve_vertically = &ConvolveVertically_SSE2;
procs->convolve_4rows_horizontally = &Convolve4RowsHorizontally_SSE2;
procs->convolve_horizontally = &ConvolveHorizontally_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;
}
#elif defined SIMD_MIPS_DSPR2
procs->extra_horizontal_reads = 3;
procs->convolve_vertically = &ConvolveVertically_mips_dspr2;
......
......@@ -9,6 +9,7 @@
#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"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment