OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2008 Google Inc. | 2 * Copyright 2008 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 // The copyright below was added in 2009, but I see no record of moto contributi
ons...? | 8 // The copyright below was added in 2009, but I see no record of moto contributi
ons...? |
9 | 9 |
10 /* NEON optimized code (C) COPYRIGHT 2009 Motorola | 10 /* NEON optimized code (C) COPYRIGHT 2009 Motorola |
(...skipping 29 matching lines...) Expand all Loading... |
40 } | 40 } |
41 | 41 |
42 void decal_nofilter_scale(uint32_t dst[], SkFixed fx, SkFixed dx, int count); | 42 void decal_nofilter_scale(uint32_t dst[], SkFixed fx, SkFixed dx, int count); |
43 void decal_filter_scale(uint32_t dst[], SkFixed fx, SkFixed dx, int count); | 43 void decal_filter_scale(uint32_t dst[], SkFixed fx, SkFixed dx, int count); |
44 | 44 |
45 #include "SkBitmapProcState_matrix_template.h" | 45 #include "SkBitmapProcState_matrix_template.h" |
46 | 46 |
47 /////////////////////////////////////////////////////////////////////////////// | 47 /////////////////////////////////////////////////////////////////////////////// |
48 | 48 |
49 // Compile neon code paths if needed | 49 // Compile neon code paths if needed |
50 #if !SK_ARM_NEON_IS_NONE | 50 #if defined(SK_ARM_HAS_NEON) |
51 | 51 |
52 // These are defined in src/opts/SkBitmapProcState_matrixProcs_neon.cpp | 52 // These are defined in src/opts/SkBitmapProcState_matrixProcs_neon.cpp |
53 extern const SkBitmapProcState::MatrixProc ClampX_ClampY_Procs_neon[]; | 53 extern const SkBitmapProcState::MatrixProc ClampX_ClampY_Procs_neon[]; |
54 extern const SkBitmapProcState::MatrixProc RepeatX_RepeatY_Procs_neon[]; | 54 extern const SkBitmapProcState::MatrixProc RepeatX_RepeatY_Procs_neon[]; |
55 | 55 |
56 #endif // !SK_ARM_NEON_IS_NONE | 56 #endif // defined(SK_ARM_HAS_NEON) |
57 | 57 |
58 // Compile non-neon code path if needed | 58 // Compile non-neon code path if needed |
59 #if !SK_ARM_NEON_IS_ALWAYS | 59 #if !defined(SK_ARM_HAS_NEON) |
60 #define MAKENAME(suffix) ClampX_ClampY ## suffix | 60 #define MAKENAME(suffix) ClampX_ClampY ## suffix |
61 #define TILEX_PROCF(fx, max) SkClampMax((fx) >> 16, max) | 61 #define TILEX_PROCF(fx, max) SkClampMax((fx) >> 16, max) |
62 #define TILEY_PROCF(fy, max) SkClampMax((fy) >> 16, max) | 62 #define TILEY_PROCF(fy, max) SkClampMax((fy) >> 16, max) |
63 #define TILEX_LOW_BITS(fx, max) (((fx) >> 12) & 0xF) | 63 #define TILEX_LOW_BITS(fx, max) (((fx) >> 12) & 0xF) |
64 #define TILEY_LOW_BITS(fy, max) (((fy) >> 12) & 0xF) | 64 #define TILEY_LOW_BITS(fy, max) (((fy) >> 12) & 0xF) |
65 #define CHECK_FOR_DECAL | 65 #define CHECK_FOR_DECAL |
66 #include "SkBitmapProcState_matrix.h" | 66 #include "SkBitmapProcState_matrix.h" |
67 | 67 |
68 struct ClampTileProcs { | 68 struct ClampTileProcs { |
69 static unsigned X(const SkBitmapProcState&, SkFixed fx, int max) { | 69 static unsigned X(const SkBitmapProcState&, SkFixed fx, int max) { |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
511 if (SkShader::kRepeat_TileMode == fTileModeX && SkShader::kRepeat_TileMode =
= fTileModeY) { | 511 if (SkShader::kRepeat_TileMode == fTileModeX && SkShader::kRepeat_TileMode =
= fTileModeY) { |
512 return SK_ARM_NEON_WRAP(RepeatX_RepeatY_Procs)[index]; | 512 return SK_ARM_NEON_WRAP(RepeatX_RepeatY_Procs)[index]; |
513 } | 513 } |
514 | 514 |
515 fTileProcX = choose_tile_proc(fTileModeX); | 515 fTileProcX = choose_tile_proc(fTileModeX); |
516 fTileProcY = choose_tile_proc(fTileModeY); | 516 fTileProcY = choose_tile_proc(fTileModeY); |
517 fTileLowBitsProcX = choose_tile_lowbits_proc(fTileModeX); | 517 fTileLowBitsProcX = choose_tile_lowbits_proc(fTileModeX); |
518 fTileLowBitsProcY = choose_tile_lowbits_proc(fTileModeY); | 518 fTileLowBitsProcY = choose_tile_lowbits_proc(fTileModeY); |
519 return GeneralXY_Procs[index]; | 519 return GeneralXY_Procs[index]; |
520 } | 520 } |
OLD | NEW |