arm: dynamic NEON support for SkBlitRow_opts_arm.cpp

This patch moves all NEON-specific code from the source
src/opts/SkBlitRow_opts_arm.cpp into a new file that is
built as part of the 'opts_arm_neon' static library.
Review URL: https://codereview.appspot.com/6449110

git-svn-id: http://skia.googlecode.com/svn/trunk@5016 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
digit@google.com 2012-08-08 22:06:29 +00:00
parent 10dccde54a
commit a8dd1ce930
4 changed files with 1186 additions and 1130 deletions

View File

@ -64,6 +64,7 @@
'../src/opts/memset.arm.S',
'../src/opts/SkBitmapProcState_opts_arm.cpp',
'../src/opts/SkBlitRow_opts_arm.cpp',
'../src/opts/SkBlitRow_opts_arm.h',
],
'conditions': [
[ 'arm_neon == 1 or arm_neon_optional == 1', {
@ -141,9 +142,11 @@
'sources': [
'../src/opts/memset16_neon.S',
'../src/opts/memset32_neon.S',
'../src/opts/SkBitmapProcState_arm_neon.cpp',
'../src/opts/SkBitmapProcState_matrixProcs_neon.cpp',
'../src/opts/SkBitmapProcState_matrix_clamp_neon.h',
'../src/opts/SkBitmapProcState_matrix_repeat_neon.h',
'../src/opts/SkBlitRow_opts_arm_neon.cpp',
],
},
],

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,41 @@
/*
* Copyright 2012 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkBlitRow_opts_arm_DEFINED
#define SkBlitRow_opts_arm_DEFINED
#include "SkBlitRow.h"
#include "SkUtilsArm.h"
// Define USE_NEON_CODE to indicate that we need to build NEON routines
#define USE_NEON_CODE (!SK_ARM_NEON_IS_NONE)
// Define USE_ARM_CODE to indicate that we need to build ARM routines
#define USE_ARM_CODE (!SK_ARM_NEON_IS_ALWAYS)
#if USE_NEON_CODE
// These are defined in SkBlitRow_opts_arm_neon.cpp
extern const SkBlitRow::Proc sk_blitrow_platform_565_procs_arm_neon[];
extern const SkBlitRow::Proc sk_blitrow_platform_4444_procs_arm_neon[];
extern const SkBlitRow::Proc32 sk_blitrow_platform_32_procs_arm_neon[];
extern void Color32_arm_neon(SkPMColor* dst, const SkPMColor* src, int count,
SkPMColor color);
#endif
#if USE_ARM_CODE
// These are defined in SkBlitRow_opts_arm.cpp
extern const SkBlitRow::Proc sk_blitrow_platform_565_procs_arm[];
extern const SkBlitRow::Proc sk_blitrow_platform_4444_procs_arm[];
extern const SkBlitRow::Proc32 sk_blitrow_platform_32_procs_arm[];
#endif
// Defined in SkBlitRow_opts_arm.cpp, used in all cases.
extern void S32A_Blend_BlitRow32_arm(SkPMColor* SK_RESTRICT dst,
const SkPMColor* SK_RESTRICT src,
int count, U8CPU alpha);
#endif

File diff suppressed because it is too large Load Diff