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

Unified Diff: src/opts/SkBitmapProcState_opts_SSE2.cpp

Issue 239453010: Properly enable S32_D16_filter_DX_SSE2 optimization. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed RGB inversion Created 6 years, 8 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 | « no previous file | src/opts/opts_check_SSE2.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkBitmapProcState_opts_SSE2.cpp
diff --git a/src/opts/SkBitmapProcState_opts_SSE2.cpp b/src/opts/SkBitmapProcState_opts_SSE2.cpp
index 0b079977eb8de089f2a773cbcbd4244de3949bc8..68bd369b852a68cfbb0e0fb0bf9ebfdadcabed62 100644
--- a/src/opts/SkBitmapProcState_opts_SSE2.cpp
+++ b/src/opts/SkBitmapProcState_opts_SSE2.cpp
@@ -9,6 +9,7 @@
#include <emmintrin.h>
#include "SkBitmapProcState_opts_SSE2.h"
+#include "SkColorPriv.h"
#include "SkPaint.h"
#include "SkUtils.h"
@@ -639,8 +640,8 @@ void ClampX_ClampY_nofilter_affine_SSE2(const SkBitmapProcState& s,
* It combines S32_opaque_D32_filter_DX_SSE2 and SkPixel32ToPixel16
*/
void S32_D16_filter_DX_SSE2(const SkBitmapProcState& s,
- const uint32_t* xy,
- int count, uint16_t* colors) {
+ const uint32_t* xy,
+ int count, uint16_t* colors) {
SkASSERT(count > 0 && colors != NULL);
SkASSERT(s.fFilterLevel != SkPaint::kNone_FilterLevel);
SkASSERT(s.fBitmap->config() == SkBitmap::kARGB_8888_Config);
@@ -744,8 +745,9 @@ void S32_D16_filter_DX_SSE2(const SkBitmapProcState& s,
// Extract low int and store.
dstColor = _mm_cvtsi128_si32(sum);
- //*colors++ = SkPixel32ToPixel16(dstColor);
+ *colors++ = SkPixel32ToPixel16(dstColor);
djsollen 2014/04/28 13:05:11 If this is indeed faster then lets remove the code
henrik.smiding 2014/04/28 13:37:59 Done.
// below is much faster than the above. It's tested for Android benchmark--Softweg
+ /* Disabled, since it doesn't work with anything but ABGR format.
__m128i _m_temp1 = _mm_set1_epi32(dstColor);
__m128i _m_temp2 = _mm_srli_epi32(_m_temp1, 3);
@@ -761,6 +763,6 @@ void S32_D16_filter_DX_SSE2(const SkBitmapProcState& s,
unsigned b = (b32 & ((1<<5) -1));
*colors++ = r | g | b;
-
+ */
} while (--count > 0);
}
« no previous file with comments | « no previous file | src/opts/opts_check_SSE2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698