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..4e04a3daddcd3caffca4d7560bec925fa0c23c16 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,14 @@ 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) |
+ if (sk_cpu_arm_has_neon()) { |
+ SkPackARGB32_neon(reinterpret_cast<const uint32_t*>(src), |
+ reinterpret_cast<SkPMColor*>(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; |