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