OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 #include "SkBitmapCache.h" | 8 #include "SkBitmapCache.h" |
9 #include "SkBitmapController.h" | 9 #include "SkBitmapController.h" |
10 #include "SkBitmapProcState.h" | 10 #include "SkBitmapProcState.h" |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 break; | 518 break; |
519 case SkShader::kRepeat_TileMode: | 519 case SkShader::kRepeat_TileMode: |
520 iY0 = sk_int_mod(yTemp, stopY); | 520 iY0 = sk_int_mod(yTemp, stopY); |
521 break; | 521 break; |
522 case SkShader::kMirror_TileMode: | 522 case SkShader::kMirror_TileMode: |
523 default: | 523 default: |
524 iY0 = sk_int_mirror(yTemp, stopY); | 524 iY0 = sk_int_mirror(yTemp, stopY); |
525 break; | 525 break; |
526 } | 526 } |
527 | 527 |
528 #ifdef SK_DEBUG | 528 // http://code.google.com/p/skia/issues/detail?id=4874 |
| 529 #ifdef DISABLED_SK_DEBUG |
529 { | 530 { |
530 SkPoint pt; | 531 SkPoint pt; |
531 s.fInvProc(s.fInvMatrix, | 532 s.fInvProc(s.fInvMatrix, |
532 SkIntToScalar(x) + SK_ScalarHalf, | 533 SkIntToScalar(x) + SK_ScalarHalf, |
533 SkIntToScalar(y) + SK_ScalarHalf, | 534 SkIntToScalar(y) + SK_ScalarHalf, |
534 &pt); | 535 &pt); |
535 if (s.fInvType > SkMatrix::kTranslate_Mask && | 536 if (s.fInvType > SkMatrix::kTranslate_Mask && |
536 (SkShader::kClamp_TileMode != s.fTileModeX || | 537 (SkShader::kClamp_TileMode != s.fTileModeX || |
537 SkShader::kClamp_TileMode != s.fTileModeY)) { | 538 SkShader::kClamp_TileMode != s.fTileModeY)) { |
538 pt.fY *= s.fPixmap.height(); | 539 pt.fY *= s.fPixmap.height(); |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
826 fx += dx; | 827 fx += dx; |
827 } | 828 } |
828 } else { | 829 } else { |
829 for (int i = 0; i < count; ++i) { | 830 for (int i = 0; i < count; ++i) { |
830 dst[i] = src[SkClampMax(SkFractionalIntToInt(fx), maxX)]; | 831 dst[i] = src[SkClampMax(SkFractionalIntToInt(fx), maxX)]; |
831 fx += dx; | 832 fx += dx; |
832 } | 833 } |
833 } | 834 } |
834 } | 835 } |
835 | 836 |
OLD | NEW |