Index: src/opts/SkBitmapProcState_opts_SSSE3.cpp |
diff --git a/src/opts/SkBitmapProcState_opts_SSSE3.cpp b/src/opts/SkBitmapProcState_opts_SSSE3.cpp |
index 165f1f5ce068ffe560fa85ddbbaf80f93ad0ea68..746a264920d11c163f296c54b20a6c0f02243e4a 100644 |
--- a/src/opts/SkBitmapProcState_opts_SSSE3.cpp |
+++ b/src/opts/SkBitmapProcState_opts_SSSE3.cpp |
@@ -6,6 +6,7 @@ |
*/ |
#include "SkBitmapProcState_opts_SSSE3.h" |
+#include "SkColorPriv.h" |
#include "SkPaint.h" |
#include "SkUtils.h" |
@@ -720,17 +721,27 @@ void S32_alpha_D32_filter_DX_SSSE3(const SkBitmapProcState& s, |
} |
void S32_opaque_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s, |
- const uint32_t* xy, |
- int count, uint32_t* colors) { |
+ const uint32_t* xy, |
+ int count, uint32_t* colors) { |
S32_generic_D32_filter_DXDY_SSSE3<false>(s, xy, count, colors); |
} |
void S32_alpha_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s, |
- const uint32_t* xy, |
- int count, uint32_t* colors) { |
+ const uint32_t* xy, |
+ int count, uint32_t* colors) { |
S32_generic_D32_filter_DXDY_SSSE3<true>(s, xy, count, colors); |
} |
+void S32_D16_filter_DXDY_SSSE3(const SkBitmapProcState& s, |
+ const uint32_t* xy, |
+ int count, uint16_t* colors) { |
+ SkAutoTMalloc<uint32_t> colors32(count); |
qiankun
2014/12/02 10:51:41
If "uint32_t colors32[128];" used here, it's more
mtklein
2014/12/02 15:19:05
Might be worth trying SkAutoSTMalloc<64, uint32_t>
qiankun1
2014/12/02 15:58:43
Done. Where is these performance improvement from?
mtklein
2014/12/02 16:52:22
Right, just heap vs. stack. There's no difference
|
+ S32_generic_D32_filter_DXDY_SSSE3<false>(s, xy, count, colors32); |
+ for(int i = 0; i < count; i++) { |
+ *colors++ = SkPixel32ToPixel16(colors32[i]); |
+ } |
+} |
+ |
#else // SK_CPU_SSE_LEVEL >= SK_CPU_SSE_LEVEL_SSSE3 |
void S32_opaque_D32_filter_DX_SSSE3(const SkBitmapProcState& s, |
@@ -746,14 +757,20 @@ void S32_alpha_D32_filter_DX_SSSE3(const SkBitmapProcState& s, |
} |
void S32_opaque_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s, |
- const uint32_t* xy, |
- int count, uint32_t* colors) { |
+ const uint32_t* xy, |
+ int count, uint32_t* colors) { |
sk_throw(); |
} |
void S32_alpha_D32_filter_DXDY_SSSE3(const SkBitmapProcState& s, |
- const uint32_t* xy, |
- int count, uint32_t* colors) { |
+ const uint32_t* xy, |
+ int count, uint32_t* colors) { |
+ sk_throw(); |
+} |
+ |
+void S32_D16_filter_DXDY_SSSE3(const SkBitmapProcState& s, |
+ const uint32_t* xy, |
+ int count, uint32_t* colors) { |
sk_throw(); |
} |