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

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

Issue 19825002: stop using bitmap-filter flags outside of paint itself, as a step towards really changing them into… (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkBitmapProcState.cpp ('k') | src/core/SkBitmapProcState_sample.h » ('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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 } 465 }
466 } 466 }
467 467
468 /////////////////////////////////////////////////////////////////////////////// 468 ///////////////////////////////////////////////////////////////////////////////
469 469
470 SkBitmapProcState::MatrixProc 470 SkBitmapProcState::MatrixProc
471 SkBitmapProcState::chooseMatrixProc(bool trivial_matrix) { 471 SkBitmapProcState::chooseMatrixProc(bool trivial_matrix) {
472 // test_int_tileprocs(); 472 // test_int_tileprocs();
473 // check for our special case when there is no scale/affine/perspective 473 // check for our special case when there is no scale/affine/perspective
474 if (trivial_matrix) { 474 if (trivial_matrix) {
475 SkASSERT(kNone_BitmapFilter == fFilterQuality); 475 SkASSERT(SkPaint::kNone_FilterLevel == fFilterLevel);
476 fIntTileProcY = choose_int_tile_proc(fTileModeY); 476 fIntTileProcY = choose_int_tile_proc(fTileModeY);
477 switch (fTileModeX) { 477 switch (fTileModeX) {
478 case SkShader::kClamp_TileMode: 478 case SkShader::kClamp_TileMode:
479 return clampx_nofilter_trans; 479 return clampx_nofilter_trans;
480 case SkShader::kRepeat_TileMode: 480 case SkShader::kRepeat_TileMode:
481 return repeatx_nofilter_trans; 481 return repeatx_nofilter_trans;
482 case SkShader::kMirror_TileMode: 482 case SkShader::kMirror_TileMode:
483 return mirrorx_nofilter_trans; 483 return mirrorx_nofilter_trans;
484 } 484 }
485 } 485 }
486 486
487 int index = 0; 487 int index = 0;
488 if (fFilterQuality != kNone_BitmapFilter) { 488 if (fFilterLevel != SkPaint::kNone_FilterLevel) {
489 index = 1; 489 index = 1;
490 } 490 }
491 if (fInvType & SkMatrix::kPerspective_Mask) { 491 if (fInvType & SkMatrix::kPerspective_Mask) {
492 index += 4; 492 index += 4;
493 } else if (fInvType & SkMatrix::kAffine_Mask) { 493 } else if (fInvType & SkMatrix::kAffine_Mask) {
494 index += 2; 494 index += 2;
495 } 495 }
496 496
497 if (SkShader::kClamp_TileMode == fTileModeX && 497 if (SkShader::kClamp_TileMode == fTileModeX &&
498 SkShader::kClamp_TileMode == fTileModeY) 498 SkShader::kClamp_TileMode == fTileModeY)
(...skipping 13 matching lines...) Expand all
512 { 512 {
513 return SK_ARM_NEON_WRAP(RepeatX_RepeatY_Procs)[index]; 513 return SK_ARM_NEON_WRAP(RepeatX_RepeatY_Procs)[index];
514 } 514 }
515 515
516 fTileProcX = choose_tile_proc(fTileModeX); 516 fTileProcX = choose_tile_proc(fTileModeX);
517 fTileProcY = choose_tile_proc(fTileModeY); 517 fTileProcY = choose_tile_proc(fTileModeY);
518 fTileLowBitsProcX = choose_tile_lowbits_proc(fTileModeX); 518 fTileLowBitsProcX = choose_tile_lowbits_proc(fTileModeX);
519 fTileLowBitsProcY = choose_tile_lowbits_proc(fTileModeY); 519 fTileLowBitsProcY = choose_tile_lowbits_proc(fTileModeY);
520 return GeneralXY_Procs[index]; 520 return GeneralXY_Procs[index];
521 } 521 }
OLDNEW
« no previous file with comments | « src/core/SkBitmapProcState.cpp ('k') | src/core/SkBitmapProcState_sample.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698