OLD | NEW |
1 /* NEON optimized code (C) COPYRIGHT 2009 Motorola | 1 /* NEON optimized code (C) COPYRIGHT 2009 Motorola |
2 * | 2 * |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 #include "SkBitmapProcState.h" | 7 #include "SkBitmapProcState.h" |
8 #include "SkPerspIter.h" | 8 #include "SkPerspIter.h" |
9 #include "SkShader.h" | 9 #include "SkShader.h" |
10 #include "SkUtils.h" | 10 #include "SkUtils.h" |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 SkIntToScalar(y) + SK_ScalarHalf, &pt); | 322 SkIntToScalar(y) + SK_ScalarHalf, &pt); |
323 **xy = s.fIntTileProcY(SkScalarToFixed(pt.fY) >> 16, | 323 **xy = s.fIntTileProcY(SkScalarToFixed(pt.fY) >> 16, |
324 s.fBitmap->height()); | 324 s.fBitmap->height()); |
325 *xy += 1; // bump the ptr | 325 *xy += 1; // bump the ptr |
326 // return our starting X position | 326 // return our starting X position |
327 return SkScalarToFixed(pt.fX) >> 16; | 327 return SkScalarToFixed(pt.fX) >> 16; |
328 } | 328 } |
329 | 329 |
330 static void clampx_nofilter_trans(const SkBitmapProcState& s, | 330 static void clampx_nofilter_trans(const SkBitmapProcState& s, |
331 uint32_t xy[], int count, int x, int y) { | 331 uint32_t xy[], int count, int x, int y) { |
332 SkASSERT((s.fInvType & ~SkMatrix::kTranslate_Mask) == 0); | 332 // SkASSERT((s.fInvType & ~SkMatrix::kTranslate_Mask) == 0); |
333 | 333 |
334 int xpos = nofilter_trans_preamble(s, &xy, x, y); | 334 int xpos = nofilter_trans_preamble(s, &xy, x, y); |
335 const int width = s.fBitmap->width(); | 335 const int width = s.fBitmap->width(); |
336 if (1 == width) { | 336 if (1 == width) { |
337 // all of the following X values must be 0 | 337 // all of the following X values must be 0 |
338 memset(xy, 0, count * sizeof(uint16_t)); | 338 memset(xy, 0, count * sizeof(uint16_t)); |
339 return; | 339 return; |
340 } | 340 } |
341 | 341 |
342 uint16_t* xptr = reinterpret_cast<uint16_t*>(xy); | 342 uint16_t* xptr = reinterpret_cast<uint16_t*>(xy); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 if (SkShader::kRepeat_TileMode == fTileModeX && SkShader::kRepeat_TileMode =
= fTileModeY) { | 514 if (SkShader::kRepeat_TileMode == fTileModeX && SkShader::kRepeat_TileMode =
= fTileModeY) { |
515 return SK_ARM_NEON_WRAP(RepeatX_RepeatY_Procs)[index]; | 515 return SK_ARM_NEON_WRAP(RepeatX_RepeatY_Procs)[index]; |
516 } | 516 } |
517 | 517 |
518 fTileProcX = choose_tile_proc(fTileModeX); | 518 fTileProcX = choose_tile_proc(fTileModeX); |
519 fTileProcY = choose_tile_proc(fTileModeY); | 519 fTileProcY = choose_tile_proc(fTileModeY); |
520 fTileLowBitsProcX = choose_tile_lowbits_proc(fTileModeX); | 520 fTileLowBitsProcX = choose_tile_lowbits_proc(fTileModeX); |
521 fTileLowBitsProcY = choose_tile_lowbits_proc(fTileModeY); | 521 fTileLowBitsProcY = choose_tile_lowbits_proc(fTileModeY); |
522 return GeneralXY_Procs[index]; | 522 return GeneralXY_Procs[index]; |
523 } | 523 } |
OLD | NEW |