Bug 1189593 - Only use SSE2 in image::Downscaler if we're running on an SSE2-capable machine. r=tn

This commit is contained in:
Seth Fowler 2015-07-30 19:48:22 -07:00
parent 178195762d
commit 49c394e147

View File

@ -10,6 +10,7 @@
#include <ctime>
#include "gfxPrefs.h"
#include "image_operations.h"
#include "mozilla/SSE.h"
#include "convolver.h"
#include "skia/include/core/SkTypes.h"
@ -159,7 +160,7 @@ Downscaler::CommitRow()
if (mCurrentInLine == inLineToRead) {
skia::ConvolveHorizontally(mRowBuffer.get(), *mXFilter,
mWindow[mLinesInBuffer++], mHasAlpha,
/* use_sse2 = */ true);
supports_sse2());
}
MOZ_ASSERT(mCurrentOutLine < mTargetSize.height,
@ -226,7 +227,7 @@ Downscaler::DownscaleInputLine()
&mOutputBuffer[mCurrentOutLine * mTargetSize.width * sizeof(uint32_t)];
skia::ConvolveVertically(static_cast<const FilterValue*>(filterValues),
filterLength, mWindow.get(), mXFilter->num_values(),
outputLine, mHasAlpha, /* use_sse2 = */ true);
outputLine, mHasAlpha, supports_sse2());
mCurrentOutLine += 1;