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

Side by Side Diff: src/core/SkBitmapProcState_matrixProcs.cpp

Issue 306013010: allow subpixel positioning w/ bitmap filtering Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « src/core/SkBitmapProcState.cpp ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/core/SkBitmapProcState.cpp ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698