OLD | NEW |
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 "CrashHandler.h" | 8 #include "CrashHandler.h" |
9 #include "DMJsonWriter.h" | 9 #include "DMJsonWriter.h" |
10 #include "DMSrcSink.h" | 10 #include "DMSrcSink.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 } | 186 } |
187 SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded)); | 187 SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded)); |
188 if (NULL == codec.get()) { | 188 if (NULL == codec.get()) { |
189 SkDebugf("Couldn't create codec for %s.", path.c_str()); | 189 SkDebugf("Couldn't create codec for %s.", path.c_str()); |
190 return; | 190 return; |
191 } | 191 } |
192 | 192 |
193 // Build additional test cases for images that decode natively to non-canvas
types | 193 // Build additional test cases for images that decode natively to non-canvas
types |
194 switch(codec->getInfo().colorType()) { | 194 switch(codec->getInfo().colorType()) { |
195 case kGray_8_SkColorType: | 195 case kGray_8_SkColorType: |
196 push_src("image", "codec kGray8", new CodecSrc(path, CodecSrc::kNorm
al_Mode, | 196 push_src("image", "codec_kGray8", new CodecSrc(path, CodecSrc::kNorm
al_Mode, |
197 CodecSrc::kGrayscale_Always_DstColorType)); | 197 CodecSrc::kGrayscale_Always_DstColorType)); |
198 push_src("image", "scanline kGray8", new CodecSrc(path, CodecSrc::kS
canline_Mode, | 198 push_src("image", "scanline_kGray8", new CodecSrc(path, CodecSrc::kS
canline_Mode, |
199 CodecSrc::kGrayscale_Always_DstColorType)); | 199 CodecSrc::kGrayscale_Always_DstColorType)); |
200 // Intentional fall through | 200 // Intentional fall through |
201 // FIXME: Is this a long term solution for testing wbmps decodes to
kIndex8? | 201 // FIXME: Is this a long term solution for testing wbmps decodes to
kIndex8? |
202 // Further discussion on this topic is at skbug.com/3683 | 202 // Further discussion on this topic is at skbug.com/3683 |
203 case kIndex_8_SkColorType: | 203 case kIndex_8_SkColorType: |
204 push_src("image", "codec kIndex8", new CodecSrc(path, CodecSrc::kNorma
l_Mode, | 204 push_src("image", "codec_kIndex8", new CodecSrc(path, CodecSrc::kNorma
l_Mode, |
205 CodecSrc::kIndex8_Always_DstColorType)); | 205 CodecSrc::kIndex8_Always_DstColorType)); |
206 // FIXME: Need to implement scanline decoding for kIndex8. | 206 // FIXME: Need to implement scanline decoding for kIndex8. |
207 //push_src("image", "scanline kIndex8", new CodecSrc(path, CodecSrc::k
Scanline_Mode, | 207 //push_src("image", "scanline kIndex8", new CodecSrc(path, CodecSrc::k
Scanline_Mode, |
208 // CodecSrc::kIndex8_Always_DstColorType)); | 208 // CodecSrc::kIndex8_Always_DstColorType)); |
209 break; | 209 break; |
210 default: | 210 default: |
211 // Do nothing | 211 // Do nothing |
212 break; | 212 break; |
213 } | 213 } |
214 | 214 |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 } | 744 } |
745 return 0; | 745 return 0; |
746 } | 746 } |
747 | 747 |
748 #if !defined(SK_BUILD_FOR_IOS) | 748 #if !defined(SK_BUILD_FOR_IOS) |
749 int main(int argc, char** argv) { | 749 int main(int argc, char** argv) { |
750 SkCommandLineFlags::Parse(argc, argv); | 750 SkCommandLineFlags::Parse(argc, argv); |
751 return dm_main(); | 751 return dm_main(); |
752 } | 752 } |
753 #endif | 753 #endif |
OLD | NEW |