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

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

Issue 456843002: short circuit high quality scales that are actually the identity (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Move erroneous assert into parent if() condition Created 6 years, 4 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') | no next file » | 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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 fill_backwards(xptr, width - 1, count); 470 fill_backwards(xptr, width - 1, count);
471 } 471 }
472 } 472 }
473 } 473 }
474 474
475 /////////////////////////////////////////////////////////////////////////////// 475 ///////////////////////////////////////////////////////////////////////////////
476 476
477 SkBitmapProcState::MatrixProc SkBitmapProcState::chooseMatrixProc(bool trivial_m atrix) { 477 SkBitmapProcState::MatrixProc SkBitmapProcState::chooseMatrixProc(bool trivial_m atrix) {
478 // test_int_tileprocs(); 478 // test_int_tileprocs();
479 // check for our special case when there is no scale/affine/perspective 479 // check for our special case when there is no scale/affine/perspective
480 if (trivial_matrix) { 480 if (trivial_matrix && SkPaint::kNone_FilterLevel == fFilterLevel) {
481 SkASSERT(SkPaint::kNone_FilterLevel == fFilterLevel);
482 fIntTileProcY = choose_int_tile_proc(fTileModeY); 481 fIntTileProcY = choose_int_tile_proc(fTileModeY);
483 switch (fTileModeX) { 482 switch (fTileModeX) {
484 case SkShader::kClamp_TileMode: 483 case SkShader::kClamp_TileMode:
485 return clampx_nofilter_trans; 484 return clampx_nofilter_trans;
486 case SkShader::kRepeat_TileMode: 485 case SkShader::kRepeat_TileMode:
487 return repeatx_nofilter_trans; 486 return repeatx_nofilter_trans;
488 case SkShader::kMirror_TileMode: 487 case SkShader::kMirror_TileMode:
489 return mirrorx_nofilter_trans; 488 return mirrorx_nofilter_trans;
490 } 489 }
491 } 490 }
(...skipping 22 matching lines...) Expand all
514 if (SkShader::kRepeat_TileMode == fTileModeX && SkShader::kRepeat_TileMode = = fTileModeY) { 513 if (SkShader::kRepeat_TileMode == fTileModeX && SkShader::kRepeat_TileMode = = fTileModeY) {
515 return SK_ARM_NEON_WRAP(RepeatX_RepeatY_Procs)[index]; 514 return SK_ARM_NEON_WRAP(RepeatX_RepeatY_Procs)[index];
516 } 515 }
517 516
518 fTileProcX = choose_tile_proc(fTileModeX); 517 fTileProcX = choose_tile_proc(fTileModeX);
519 fTileProcY = choose_tile_proc(fTileModeY); 518 fTileProcY = choose_tile_proc(fTileModeY);
520 fTileLowBitsProcX = choose_tile_lowbits_proc(fTileModeX); 519 fTileLowBitsProcX = choose_tile_lowbits_proc(fTileModeX);
521 fTileLowBitsProcY = choose_tile_lowbits_proc(fTileModeY); 520 fTileLowBitsProcY = choose_tile_lowbits_proc(fTileModeY);
522 return GeneralXY_Procs[index]; 521 return GeneralXY_Procs[index];
523 } 522 }
OLDNEW
« no previous file with comments | « src/core/SkBitmapProcState.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698