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

Unified Diff: src/core/SkBlitRow_D32.cpp

Issue 1820313002: Port S32A_opaque blit row to SkOpts. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fmt Created 4 years, 9 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/opts.gypi ('k') | src/core/SkOpts.h » ('j') | src/opts/SkOpts_sse41.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBlitRow_D32.cpp
diff --git a/src/core/SkBlitRow_D32.cpp b/src/core/SkBlitRow_D32.cpp
index 75330ae33761a5ba8d8a81e7e3359de9b9c64254..80c72421049a8ad1f519a4491550466f9aac4f4f 100644
--- a/src/core/SkBlitRow_D32.cpp
+++ b/src/core/SkBlitRow_D32.cpp
@@ -52,35 +52,6 @@ static void S32_Blend_BlitRow32(SkPMColor* SK_RESTRICT dst,
}
}
-static void S32A_Opaque_BlitRow32(SkPMColor* SK_RESTRICT dst,
- const SkPMColor* SK_RESTRICT src,
- int count, U8CPU alpha) {
- SkASSERT(255 == alpha);
- if (count > 0) {
-#ifdef UNROLL
- if (count & 1) {
- *dst = SkPMSrcOver(*(src++), *dst);
- dst += 1;
- count -= 1;
- }
-
- const SkPMColor* SK_RESTRICT srcEnd = src + count;
- while (src != srcEnd) {
- *dst = SkPMSrcOver(*(src++), *dst);
- dst += 1;
- *dst = SkPMSrcOver(*(src++), *dst);
- dst += 1;
- }
-#else
- do {
- *dst = SkPMSrcOver(*src, *dst);
- src += 1;
- dst += 1;
- } while (--count > 0);
-#endif
- }
-}
-
static void S32A_Blend_BlitRow32(SkPMColor* SK_RESTRICT dst,
const SkPMColor* SK_RESTRICT src,
int count, U8CPU alpha) {
@@ -115,7 +86,7 @@ static void S32A_Blend_BlitRow32(SkPMColor* SK_RESTRICT dst,
static const SkBlitRow::Proc32 gDefault_Procs32[] = {
S32_Opaque_BlitRow32,
S32_Blend_BlitRow32,
- S32A_Opaque_BlitRow32,
+ nullptr,
S32A_Blend_BlitRow32
};
@@ -124,6 +95,11 @@ SkBlitRow::Proc32 SkBlitRow::Factory32(unsigned flags) {
// just so we don't crash
flags &= kFlags32_Mask;
+ if (flags == 2) {
+ // S32A_Opaque_BlitRow32 has been ported to SkOpts, but not the others yet.
+ return SkOpts::blit_row_s32a_opaque;
+ }
+
SkBlitRow::Proc32 proc = PlatformProcs32(flags);
if (nullptr == proc) {
proc = gDefault_Procs32[flags];
« no previous file with comments | « gyp/opts.gypi ('k') | src/core/SkOpts.h » ('j') | src/opts/SkOpts_sse41.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698