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 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 Sample_D565_D565, Sample_D565_D565, Sample_D565_D565, Samp
le_D565_D565, // to 565 | 827 Sample_D565_D565, Sample_D565_D565, Sample_D565_D565, Samp
le_D565_D565, // to 565 |
828 NULL, NULL, NULL, NULL
, // to 4444 | 828 NULL, NULL, NULL, NULL
, // to 4444 |
829 NULL, NULL, NULL, NULL
, // to 8888 | 829 NULL, NULL, NULL, NULL
, // to 8888 |
830 }; | 830 }; |
831 | 831 |
832 // Dummy class that allows instantiation of an ImageDecoder, so begin can query
its fields. | 832 // Dummy class that allows instantiation of an ImageDecoder, so begin can query
its fields. |
833 class DummyDecoder : public SkImageDecoder { | 833 class DummyDecoder : public SkImageDecoder { |
834 public: | 834 public: |
835 DummyDecoder() {} | 835 DummyDecoder() {} |
836 protected: | 836 protected: |
837 virtual Result onDecode(SkStream*, SkBitmap*, SkImageDecoder::Mode) SK_OVERR
IDE { | 837 Result onDecode(SkStream*, SkBitmap*, SkImageDecoder::Mode) SK_OVERRIDE { |
838 return kFailure; | 838 return kFailure; |
839 } | 839 } |
840 }; | 840 }; |
841 | 841 |
842 void test_row_proc_choice(); | 842 void test_row_proc_choice(); |
843 void test_row_proc_choice() { | 843 void test_row_proc_choice() { |
844 const SkColorType colorTypes[] = { | 844 const SkColorType colorTypes[] = { |
845 kAlpha_8_SkColorType, kIndex_8_SkColorType, kRGB_565_SkColorType, kARGB_
4444_SkColorType, | 845 kAlpha_8_SkColorType, kIndex_8_SkColorType, kRGB_565_SkColorType, kARGB_
4444_SkColorType, |
846 kN32_SkColorType | 846 kN32_SkColorType |
847 }; | 847 }; |
(...skipping 18 matching lines...) Expand all Loading... |
866 SkScaledBitmapSampler::RowProc actual = RowProcTester::getRo
wProc(sampler); | 866 SkScaledBitmapSampler::RowProc actual = RowProcTester::getRo
wProc(sampler); |
867 SkASSERT(expected == actual); | 867 SkASSERT(expected == actual); |
868 procCounter++; | 868 procCounter++; |
869 } | 869 } |
870 } | 870 } |
871 } | 871 } |
872 } | 872 } |
873 SkASSERT(SK_ARRAY_COUNT(gTestProcs) == procCounter); | 873 SkASSERT(SK_ARRAY_COUNT(gTestProcs) == procCounter); |
874 } | 874 } |
875 #endif // SK_DEBUG | 875 #endif // SK_DEBUG |
OLD | NEW |