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

Side by Side Diff: tests/ImageDecodingTest.cpp

Issue 292663011: Simple PKM image decoder. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkColor.h" 10 #include "SkColor.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 * to do being an opaque format or not a valid format. 44 * to do being an opaque format or not a valid format.
45 */ 45 */
46 static bool skip_image_format(SkImageDecoder::Format format) { 46 static bool skip_image_format(SkImageDecoder::Format format) {
47 switch (format) { 47 switch (format) {
48 case SkImageDecoder::kPNG_Format: 48 case SkImageDecoder::kPNG_Format:
49 case SkImageDecoder::kWEBP_Format: 49 case SkImageDecoder::kWEBP_Format:
50 return false; 50 return false;
51 // Skip unknown since it will not be decoded anyway. 51 // Skip unknown since it will not be decoded anyway.
52 case SkImageDecoder::kUnknown_Format: 52 case SkImageDecoder::kUnknown_Format:
53 // Technically ICO and BMP supports alpha channels, but our image 53 // Technically ICO and BMP supports alpha channels, but our image
54 // decoders do not, so skip them as well. 54 // decoders do not, so skip them as well.
robertphillips 2014/05/22 14:41:35 Shouldn't this go in the opaque block (at the end)
krajcevski 2014/05/22 15:32:17 Done.
55 case SkImageDecoder::kPKM_Format:
55 case SkImageDecoder::kICO_Format: 56 case SkImageDecoder::kICO_Format:
56 case SkImageDecoder::kBMP_Format: 57 case SkImageDecoder::kBMP_Format:
57 // The rest of these are opaque. 58 // The rest of these are opaque.
58 case SkImageDecoder::kWBMP_Format: 59 case SkImageDecoder::kWBMP_Format:
59 case SkImageDecoder::kGIF_Format: 60 case SkImageDecoder::kGIF_Format:
60 case SkImageDecoder::kJPEG_Format: 61 case SkImageDecoder::kJPEG_Format:
61 return true; 62 return true;
62 } 63 }
63 SkASSERT(false); 64 SkASSERT(false);
64 return true; 65 return true;
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 } 730 }
730 SkDecodingImageGenerator::Options options(scaleList[i], 731 SkDecodingImageGenerator::Options options(scaleList[i],
731 ditherList[j]); 732 ditherList[j]);
732 test_options(reporter, options, encodedStream, encodedData, 733 test_options(reporter, options, encodedStream, encodedData,
733 useDataList[m], path); 734 useDataList[m], path);
734 } 735 }
735 } 736 }
736 } 737 }
737 } 738 }
738 } 739 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698