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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 #else | 322 #else |
323 for (int i = 0; i < count; i++) { | 323 for (int i = 0; i < count; i++) { |
324 *xptr++ = start++; | 324 *xptr++ = start++; |
325 } | 325 } |
326 #endif | 326 #endif |
327 } | 327 } |
328 | 328 |
329 static int nofilter_trans_preamble(const SkBitmapProcState& s, uint32_t** xy, | 329 static int nofilter_trans_preamble(const SkBitmapProcState& s, uint32_t** xy, |
330 int x, int y) { | 330 int x, int y) { |
331 const SkBitmapProcStateAutoMapper mapper(s, x, y); | 331 const SkBitmapProcStateAutoMapper mapper(s, x, y); |
332 **xy = s.fIntTileProcY(SkFractionalIntToInt(mapper.y()), s.fPixmap.height())
; | 332 **xy = s.fIntTileProcY(mapper.intY(), s.fPixmap.height()); |
333 *xy += 1; // bump the ptr | 333 *xy += 1; // bump the ptr |
334 // return our starting X position | 334 // return our starting X position |
335 return SkFractionalIntToInt(mapper.x()); | 335 return mapper.intX(); |
336 } | 336 } |
337 | 337 |
338 static void clampx_nofilter_trans(const SkBitmapProcState& s, | 338 static void clampx_nofilter_trans(const SkBitmapProcState& s, |
339 uint32_t xy[], int count, int x, int y) { | 339 uint32_t xy[], int count, int x, int y) { |
340 SkASSERT((s.fInvType & ~SkMatrix::kTranslate_Mask) == 0); | 340 SkASSERT((s.fInvType & ~SkMatrix::kTranslate_Mask) == 0); |
341 | 341 |
342 int xpos = nofilter_trans_preamble(s, &xy, x, y); | 342 int xpos = nofilter_trans_preamble(s, &xy, x, y); |
343 const int width = s.fPixmap.width(); | 343 const int width = s.fPixmap.width(); |
344 if (1 == width) { | 344 if (1 == width) { |
345 // all of the following X values must be 0 | 345 // all of the following X values must be 0 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 if (SkShader::kRepeat_TileMode == fTileModeX && SkShader::kRepeat_TileMode =
= fTileModeY) { | 521 if (SkShader::kRepeat_TileMode == fTileModeX && SkShader::kRepeat_TileMode =
= fTileModeY) { |
522 return SK_ARM_NEON_WRAP(RepeatX_RepeatY_Procs)[index]; | 522 return SK_ARM_NEON_WRAP(RepeatX_RepeatY_Procs)[index]; |
523 } | 523 } |
524 | 524 |
525 fTileProcX = choose_tile_proc(fTileModeX); | 525 fTileProcX = choose_tile_proc(fTileModeX); |
526 fTileProcY = choose_tile_proc(fTileModeY); | 526 fTileProcY = choose_tile_proc(fTileModeY); |
527 fTileLowBitsProcX = choose_tile_lowbits_proc(fTileModeX); | 527 fTileLowBitsProcX = choose_tile_lowbits_proc(fTileModeX); |
528 fTileLowBitsProcY = choose_tile_lowbits_proc(fTileModeY); | 528 fTileLowBitsProcY = choose_tile_lowbits_proc(fTileModeY); |
529 return GeneralXY_Procs[index]; | 529 return GeneralXY_Procs[index]; |
530 } | 530 } |
OLD | NEW |