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

Unified Diff: src/core/SkBlitter_RGB16.cpp

Issue 357693002: MIPS: added optimization for SkRGB16_Opaque_Blitter::blitMask (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « gyp/common_conditions.gypi ('k') | src/opts/SkBlitRow_opts_mips_dsp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBlitter_RGB16.cpp
diff --git a/src/core/SkBlitter_RGB16.cpp b/src/core/SkBlitter_RGB16.cpp
index 4503a2ae7928ea409c232d052b111cb37796d2ae..a91c0df0dee826f37c0ddde540f73acf23449303 100644
--- a/src/core/SkBlitter_RGB16.cpp
+++ b/src/core/SkBlitter_RGB16.cpp
@@ -16,6 +16,12 @@
#include "SkUtilsArm.h"
#include "SkXfermode.h"
+#if SK_MIPS_HAS_DSP
+extern void blitmask_d565_opaque_mips(int width, int height, uint16_t* device,
+ unsigned deviceRB, const uint8_t* alpha,
+ uint32_t expanded32, unsigned maskRB);
+#endif
+
#if SK_ARM_NEON_IS_ALWAYS && defined(SK_CPU_LENDIAN)
#include <arm_neon.h>
#else
@@ -368,9 +374,11 @@ void SkRGB16_Opaque_Blitter::blitAntiH(int x, int y,
#define SK_BLITBWMASK_DEVTYPE uint16_t
#include "SkBlitBWMaskTemplate.h"
+#if !defined(SK_MIPS_HAS_DSP)
static U16CPU blend_compact(uint32_t src32, uint32_t dst32, unsigned scale5) {
return SkCompact_rgb_16(dst32 + ((src32 - dst32) * scale5 >> 5));
}
+#endif
void SkRGB16_Opaque_Blitter::blitMask(const SkMask& mask,
const SkIRect& clip) {
@@ -457,6 +465,8 @@ void SkRGB16_Opaque_Blitter::blitMask(const SkMask& mask,
alpha += maskRB;
} while (--height != 0);
#undef UNROLL
+#elif SK_MIPS_HAS_DSP
+ blitmask_d565_opaque_mips(width, height, device, deviceRB, alpha, expanded32, maskRB);
#else // non-neon code
do {
int w = width;
« no previous file with comments | « gyp/common_conditions.gypi ('k') | src/opts/SkBlitRow_opts_mips_dsp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698