OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 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 "SkImageDecoder.h" | 9 #include "SkImageDecoder.h" |
10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 const char* SkImageDecoder::GetFormatName(Format format) { | 77 const char* SkImageDecoder::GetFormatName(Format format) { |
78 switch (format) { | 78 switch (format) { |
79 case kUnknown_Format: | 79 case kUnknown_Format: |
80 return "Unknown Format"; | 80 return "Unknown Format"; |
81 case kBMP_Format: | 81 case kBMP_Format: |
82 return "BMP"; | 82 return "BMP"; |
83 case kGIF_Format: | 83 case kGIF_Format: |
84 return "GIF"; | 84 return "GIF"; |
85 case kICO_Format: | 85 case kICO_Format: |
86 return "ICO"; | 86 return "ICO"; |
| 87 case kPKM_Format: |
| 88 return "PKM"; |
87 case kJPEG_Format: | 89 case kJPEG_Format: |
88 return "JPEG"; | 90 return "JPEG"; |
89 case kPNG_Format: | 91 case kPNG_Format: |
90 return "PNG"; | 92 return "PNG"; |
91 case kWBMP_Format: | 93 case kWBMP_Format: |
92 return "WBMP"; | 94 return "WBMP"; |
93 case kWEBP_Format: | 95 case kWEBP_Format: |
94 return "WEBP"; | 96 return "WEBP"; |
95 default: | 97 default: |
96 SkDEBUGFAIL("Invalid format type!"); | 98 SkDEBUGFAIL("Invalid format type!"); |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 if (kUnknown_Format == *format) { | 300 if (kUnknown_Format == *format) { |
299 if (stream->rewind()) { | 301 if (stream->rewind()) { |
300 *format = GetStreamFormat(stream); | 302 *format = GetStreamFormat(stream); |
301 } | 303 } |
302 } | 304 } |
303 } | 305 } |
304 delete codec; | 306 delete codec; |
305 } | 307 } |
306 return success; | 308 return success; |
307 } | 309 } |
OLD | NEW |