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

Side by Side Diff: src/images/SkScaledBitmapSampler.cpp

Issue 647023006: Qualify the return value of SkImageDecoder::decode (Closed) Base URL: https://skia.googlesource.com/skia.git/+/master
Patch Set: fix a sample Created 6 years, 2 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
« no previous file with comments | « src/images/SkImageDecoder_wbmp.cpp ('k') | src/ports/SkImageDecoder_CG.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/images/SkImageDecoder_wbmp.cpp ('k') | src/ports/SkImageDecoder_CG.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698