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

Side by Side Diff: tests/ImageDecodingTest.cpp

Issue 302333002: Initial KTX file decoder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: More code comments Created 6 years, 6 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/SkStreamHelpers.cpp ('k') | third_party/ktx/ktx.h » ('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 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.
55 case SkImageDecoder::kICO_Format: 55 case SkImageDecoder::kICO_Format:
56 case SkImageDecoder::kBMP_Format: 56 case SkImageDecoder::kBMP_Format:
57 // KTX is a Texture format so it's not particularly clear how to
58 // decode the alpha from it.
59 case SkImageDecoder::kKTX_Format:
57 // The rest of these are opaque. 60 // The rest of these are opaque.
58 case SkImageDecoder::kPKM_Format: 61 case SkImageDecoder::kPKM_Format:
59 case SkImageDecoder::kWBMP_Format: 62 case SkImageDecoder::kWBMP_Format:
60 case SkImageDecoder::kGIF_Format: 63 case SkImageDecoder::kGIF_Format:
61 case SkImageDecoder::kJPEG_Format: 64 case SkImageDecoder::kJPEG_Format:
62 return true; 65 return true;
63 } 66 }
64 SkASSERT(false); 67 SkASSERT(false);
65 return true; 68 return true;
66 } 69 }
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 } 722 }
720 SkDecodingImageGenerator::Options options(scaleList[i], 723 SkDecodingImageGenerator::Options options(scaleList[i],
721 ditherList[j]); 724 ditherList[j]);
722 test_options(reporter, options, encodedStream, encodedData, 725 test_options(reporter, options, encodedStream, encodedData,
723 useDataList[m], path); 726 useDataList[m], path);
724 } 727 }
725 } 728 }
726 } 729 }
727 } 730 }
728 } 731 }
OLDNEW
« no previous file with comments | « src/images/SkStreamHelpers.cpp ('k') | third_party/ktx/ktx.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698