| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2007 The Android Open Source Project | 2 * Copyright 2007 The Android Open Source Project |
| 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 | 8 |
| 9 #include "SkScaledBitmapSampler.h" | 9 #include "SkScaledBitmapSampler.h" |
| 10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
| (...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 | 653 |
| 654 get_gray_to_A8_proc, | 654 get_gray_to_A8_proc, |
| 655 NULL, // rgbx to a8 | 655 NULL, // rgbx to a8 |
| 656 NULL, // rgba to a8 | 656 NULL, // rgba to a8 |
| 657 NULL, // index to a8 | 657 NULL, // index to a8 |
| 658 NULL, // 565 to a8 | 658 NULL, // 565 to a8 |
| 659 }; | 659 }; |
| 660 | 660 |
| 661 // The jump between dst configs in the table | 661 // The jump between dst configs in the table |
| 662 static const int gProcDstConfigSpan = 5; | 662 static const int gProcDstConfigSpan = 5; |
| 663 SK_COMPILE_ASSERT(SK_ARRAY_COUNT(gProcChoosers) == 5 * gProcDstConfigSpan, | 663 static_assert(SK_ARRAY_COUNT(gProcChoosers) == 5 * gProcDstConfigSpan, |
| 664 gProcs_has_the_wrong_number_of_entries); | 664 "gProcs_has_the_wrong_number_of_entries"); |
| 665 | 665 |
| 666 fCTable = ctable; | 666 fCTable = ctable; |
| 667 | 667 |
| 668 int index = 0; | 668 int index = 0; |
| 669 switch (sc) { | 669 switch (sc) { |
| 670 case SkScaledBitmapSampler::kGray: | 670 case SkScaledBitmapSampler::kGray: |
| 671 fSrcPixelSize = 1; | 671 fSrcPixelSize = 1; |
| 672 index += 0; | 672 index += 0; |
| 673 break; | 673 break; |
| 674 case SkScaledBitmapSampler::kRGB: | 674 case SkScaledBitmapSampler::kRGB: |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 SkScaledBitmapSampler::RowProc actual = RowProcTester::getRo
wProc(sampler); | 868 SkScaledBitmapSampler::RowProc actual = RowProcTester::getRo
wProc(sampler); |
| 869 SkASSERT(expected == actual); | 869 SkASSERT(expected == actual); |
| 870 procCounter++; | 870 procCounter++; |
| 871 } | 871 } |
| 872 } | 872 } |
| 873 } | 873 } |
| 874 } | 874 } |
| 875 SkASSERT(SK_ARRAY_COUNT(gTestProcs) == procCounter); | 875 SkASSERT(SK_ARRAY_COUNT(gTestProcs) == procCounter); |
| 876 } | 876 } |
| 877 #endif // SK_DEBUG | 877 #endif // SK_DEBUG |
| OLD | NEW |