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

Unified Diff: src/ports/SkFontHost_FreeType_common.cpp

Issue 892453002: neon code for bgra to rgba conversion for copyFTBitmap 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
Index: src/ports/SkFontHost_FreeType_common.cpp
diff --git a/src/ports/SkFontHost_FreeType_common.cpp b/src/ports/SkFontHost_FreeType_common.cpp
index bd3cddf596420ae61a898636945b344d7297fd02..13f8bf145aab1d8b4f13082630093bb45a69878d 100644
--- a/src/ports/SkFontHost_FreeType_common.cpp
+++ b/src/ports/SkFontHost_FreeType_common.cpp
@@ -14,6 +14,9 @@
#include "SkFontHost_FreeType_common.h"
#include "SkPath.h"
+#include "SkUtilsArm.h"
+#include "SkFontHost_FreeType_common_opts_neon.h"
+
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_BITMAP_H
@@ -226,6 +229,13 @@ static void copyFTBitmap(const FT_Bitmap& srcFTBitmap, SkMask& dstMask) {
dst += dstRowBytes;
}
} else if (FT_PIXEL_MODE_BGRA == srcFormat && SkMask::kARGB32_Format == dstFormat) {
+#if !defined(SK_CPU_ARM64) && !defined(SK_SHOW_TEXT_BLIT_COVERAGE) && !defined(SK_CPU_BENDIAN)
+ if (sk_cpu_arm_has_neon())
+ {
reed1 2015/01/29 15:47:20 SkPMColor (which is the desired output swizzle) ca
frederic.ma 2015/01/29 18:33:09 My bad. I added compile flag to handle SkPMColor f
+ BGRA2RGBA_Neon(src, dst, height, width, dstRowBytes, srcPitch);
+ return;
+ }
+#endif
// FT_PIXEL_MODE_BGRA is pre-multiplied.
for (size_t y = height; y --> 0;) {
const uint8_t* src_row = src;

Powered by Google App Engine
This is Rietveld 408576698