diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-30 14:58:46 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-30 14:58:46 +0000 |
commit | 8c4953c6f176469ad287c3270ab146e292b23bad (patch) | |
tree | 4c7cdf4af19ef7c8ab754d9a4407b0f8ebea7ff7 /src/opts/SkBlitRow_opts_SSE2.cpp | |
parent | 125c6cdefe3d297319de6cdbf8210c9329abe99a (diff) |
Cleanup of SSE optimization files.
General cleanup of optimization files for x86/SSEx.
Renamed the opts_check_SSE2.cpp file to _x86, since it's not specific
to SSE2. Commented out the ColorRect32 optimization, since it's
disabled anyway, to make it more visible.
Also fixed a lot of indentation, inclusion guards, spelling,
copyright headers, braces, whitespace, and sorting of includes.
Author: henrik.smiding@intel.com
Signed-off-by: Henrik Smiding <henrik.smiding@intel.com>
R=reed@google.com, mtklein@google.com, tomhudson@google.com, djsollen@google.com, joakim.landberg@intel.com
Author: henrik.smiding@intel.com
Review URL: https://codereview.chromium.org/264603002
git-svn-id: http://skia.googlecode.com/svn/trunk@14464 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/opts/SkBlitRow_opts_SSE2.cpp')
-rw-r--r-- | src/opts/SkBlitRow_opts_SSE2.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/opts/SkBlitRow_opts_SSE2.cpp b/src/opts/SkBlitRow_opts_SSE2.cpp index d1474f4a67..391b24c867 100644 --- a/src/opts/SkBlitRow_opts_SSE2.cpp +++ b/src/opts/SkBlitRow_opts_SSE2.cpp @@ -5,16 +5,14 @@ * found in the LICENSE file. */ - -#include "SkBlitRow_opts_SSE2.h" +#include <emmintrin.h> #include "SkBitmapProcState_opts_SSE2.h" +#include "SkBlitRow_opts_SSE2.h" #include "SkColorPriv.h" #include "SkColor_opts_SSE2.h" #include "SkDither.h" #include "SkUtils.h" -#include <emmintrin.h> - /* SSE2 version of S32_Blend_BlitRow32() * portable version is in core/SkBlitRow_D32.cpp */ @@ -179,7 +177,7 @@ void S32A_Opaque_BlitRow32_SSE2(SkPMColor* SK_RESTRICT dst, d++; count -= 4; } - #else +#else __m128i rb_mask = _mm_set1_epi32(0x00FF00FF); __m128i c_256 = _mm_set1_epi16(0x0100); // 8 copies of 256 (16-bit) while (count >= 4) { @@ -342,7 +340,6 @@ void S32A_Blend_BlitRow32_SSE2(SkPMColor* SK_RESTRICT dst, */ void Color32_SSE2(SkPMColor dst[], const SkPMColor src[], int count, SkPMColor color) { - if (count <= 0) { return; } @@ -406,7 +403,7 @@ void Color32_SSE2(SkPMColor dst[], const SkPMColor src[], int count, } src = reinterpret_cast<const SkPMColor*>(s); dst = reinterpret_cast<SkPMColor*>(d); - } + } while (count > 0) { *dst = color + SkAlphaMulQ(*src, scale); @@ -504,7 +501,7 @@ void SkARGB32_A8_BlitMask_SSE2(void* device, size_t dstRB, const void* maskPtr, } dst = reinterpret_cast<SkPMColor *>(d); } - while(count > 0) { + while (count > 0) { *dst= SkBlendARGB32(color, *dst, *mask); dst += 1; mask++; |