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

Unified Diff: src/opts/SkXfermode_opts_arm_neon.cpp

Issue 1150313003: Move Sk4px Xfermode code to a header so we can use it twice. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: wrong date Created 5 years, 7 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 | « src/core/SkXfermode.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkXfermode_opts_arm_neon.cpp
diff --git a/src/opts/SkXfermode_opts_arm_neon.cpp b/src/opts/SkXfermode_opts_arm_neon.cpp
index 12c2f57d4fb72cf68274151fe7ba10bcbe2c6d44..1759429c574364b2fb0b78a933ff7799f026ea1a 100644
--- a/src/opts/SkXfermode_opts_arm_neon.cpp
+++ b/src/opts/SkXfermode_opts_arm_neon.cpp
@@ -1,3 +1,5 @@
+// Copyright 2013 unknown
+
#include "SkXfermode.h"
#include "SkXfermode_proccoeff.h"
#include "SkColorPriv.h"
@@ -5,6 +7,7 @@
#include <arm_neon.h>
#include "SkColor_opts_neon.h"
#include "SkXfermode_opts_arm_neon.h"
+#include "Sk4pxXfermode.h"
#define SkAlphaMulAlpha(a, b) SkMulDiv255Round(a, b)
@@ -1010,11 +1013,11 @@ SK_COMPILE_ASSERT(
SkProcCoeffXfermode* SkPlatformXfermodeFactory_impl_neon(const ProcCoeff& rec,
SkXfermode::Mode mode) {
-
- void* procSIMD = reinterpret_cast<void*>(gNEONXfermodeProcs[mode]);
-
- if (procSIMD != NULL) {
- return SkNEW_ARGS(SkNEONProcCoeffXfermode, (rec, mode, procSIMD));
+ if (auto xfermode = SkCreate4pxXfermode(rec, mode)) {
+ return xfermode;
+ }
+ if (auto proc = gNEONXfermodeProcs[mode]) {
+ return SkNEW_ARGS(SkNEONProcCoeffXfermode, (rec, mode, (void*)proc));
}
return NULL;
}
« no previous file with comments | « src/core/SkXfermode.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698