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

Unified Diff: src/core/SkXfermode.cpp

Issue 1264543006: Port SkXfermode opts to SkOpts.h (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 5 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/SkOpts.cpp ('k') | src/opts/SkOpts_neon.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkXfermode.cpp
diff --git a/src/core/SkXfermode.cpp b/src/core/SkXfermode.cpp
index 46703aa6546e07a7cd5b0d9ac3b914acbe54b803..59b689ceeb9e2b180ec6ae818b5b3de570024b8d 100644
--- a/src/core/SkXfermode.cpp
+++ b/src/core/SkXfermode.cpp
@@ -8,10 +8,10 @@
#include "SkXfermode.h"
#include "SkXfermode_proccoeff.h"
-#include "Sk4pxXfermode.h"
#include "SkColorPriv.h"
#include "SkLazyPtr.h"
#include "SkMathPriv.h"
+#include "SkOpts.h"
#include "SkPMFloat.h"
#include "SkReadBuffer.h"
#include "SkString.h"
@@ -997,30 +997,15 @@ void SkProcCoeffXfermode::toString(SkString* str) const {
#endif
-extern SkProcCoeffXfermode* SkPlatformXfermodeFactory(const ProcCoeff& rec, SkXfermode::Mode mode);
-extern SkXfermodeProc SkPlatformXfermodeProcFactory(SkXfermode::Mode mode);
-
// Technically, can't be static and passed as a template parameter. So we use anonymous namespace.
namespace {
SkXfermode* create_mode(int iMode) {
SkXfermode::Mode mode = (SkXfermode::Mode)iMode;
ProcCoeff rec = gProcCoeffs[mode];
- if (auto proc = SkPlatformXfermodeProcFactory(mode)) {
- rec.fProc = proc;
- }
-
- // Check for compile-time SIMD xfermode.
- if (auto xfermode = SkCreate4pxXfermode(rec, mode)) {
+ if (auto xfermode = SkOpts::create_xfermode(rec, mode)) {
return xfermode;
}
-
- // Check for runtime-detected SIMD xfermode.
- if (auto xfermode = SkPlatformXfermodeFactory(rec, mode)) {
- return xfermode;
- }
-
- // Serial fallback.
return SkNEW_ARGS(SkProcCoeffXfermode, (rec, mode));
}
} // namespace
« no previous file with comments | « src/core/SkOpts.cpp ('k') | src/opts/SkOpts_neon.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698