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

Unified Diff: src/core/SkBlitRow_D16.cpp

Issue 892623002: Add SSE optimization of Color32A_D565 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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/SkBlitRow_opts_SSE4.h » ('j') | src/opts/SkBlitRow_opts_SSE4.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBlitRow_D16.cpp
diff --git a/src/core/SkBlitRow_D16.cpp b/src/core/SkBlitRow_D16.cpp
index 6bf4cea9974f5d4488a65bd6aec532ccbe8096e5..5c4cce4a1ace0214542386e601f58d08be4765fb 100644
--- a/src/core/SkBlitRow_D16.cpp
+++ b/src/core/SkBlitRow_D16.cpp
@@ -9,6 +9,7 @@
#include "SkColorPriv.h"
#include "SkDither.h"
#include "SkMathPriv.h"
+#include "SkUtils.h"
///////////////////////////////////////////////////////////////////////////////
@@ -211,6 +212,11 @@ static uint32_t pmcolor_to_expand16(SkPMColor c) {
return (g << 24) | (r << 13) | (b << 2);
}
+static void Color32_D565(uint16_t dst[], SkPMColor src, int count, int x, int y) {
mtklein 2015/01/30 18:17:36 The edits to this file seem unambiguously good and
henrik.smiding 2015/02/10 15:11:51 Done.
+ SkASSERT(count > 0);
+ sk_memset16(dst, SkPixel32ToPixel16_ToU16(src), count);
+}
+
static void Color32A_D565(uint16_t dst[], SkPMColor src, int count, int x, int y) {
SkASSERT(count > 0);
uint32_t src_expand = pmcolor_to_expand16(src);
@@ -260,10 +266,10 @@ static const SkBlitRow::ColorProc16 gDefault_565_ColorProcs[] = {
Color32_D565_Dither,
Color32A_D565_Dither
#else
- // TODO: stop cheating and fill in the above specializations!
- Color32A_D565,
- Color32A_D565,
+ // TODO: stop cheating and fill dither from the above specializations! Use sk_dither_memset16?
+ Color32_D565,
Color32A_D565,
+ Color32_D565,
Color32A_D565,
#endif
};
« no previous file with comments | « no previous file | src/opts/SkBlitRow_opts_SSE4.h » ('j') | src/opts/SkBlitRow_opts_SSE4.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698