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

Side by Side Diff: dm/DM.cpp

Issue 1134113006: dm changes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: removing extraX and extraY variables and moving declarations Created 5 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
« no previous file with comments | « no previous file | dm/DMSrcSink.h » ('j') | dm/DMSrcSink.cpp » ('J')
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 "CrashHandler.h" 8 #include "CrashHandler.h"
9 #include "DMJsonWriter.h" 9 #include "DMJsonWriter.h"
10 #include "DMSrcSink.h" 10 #include "DMSrcSink.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 return; 200 return;
201 } 201 }
202 202
203 // Build additional test cases for images that decode natively to non-canvas types 203 // Build additional test cases for images that decode natively to non-canvas types
204 switch(codec->getInfo().colorType()) { 204 switch(codec->getInfo().colorType()) {
205 case kGray_8_SkColorType: 205 case kGray_8_SkColorType:
206 push_src("image", "codec_kGray8", new CodecSrc(path, CodecSrc::kNorm al_Mode, 206 push_src("image", "codec_kGray8", new CodecSrc(path, CodecSrc::kNorm al_Mode,
207 CodecSrc::kGrayscale_Always_DstColorType)); 207 CodecSrc::kGrayscale_Always_DstColorType));
208 push_src("image", "scanline_kGray8", new CodecSrc(path, CodecSrc::kS canline_Mode, 208 push_src("image", "scanline_kGray8", new CodecSrc(path, CodecSrc::kS canline_Mode,
209 CodecSrc::kGrayscale_Always_DstColorType)); 209 CodecSrc::kGrayscale_Always_DstColorType));
210 push_src("image", "scanline_subset_kGray8", new CodecSrc(path,
211 CodecSrc::kScanline_Subset_Mode, CodecSrc::kGrayscale_Always _DstColorType));
210 // Intentional fall through 212 // Intentional fall through
211 // FIXME: Is this a long term solution for testing wbmps decodes to kIndex8? 213 // FIXME: Is this a long term solution for testing wbmps decodes to kIndex8?
212 // Further discussion on this topic is at skbug.com/3683 214 // Further discussion on this topic is at skbug.com/3683
213 case kIndex_8_SkColorType: 215 case kIndex_8_SkColorType:
214 push_src("image", "codec_kIndex8", new CodecSrc(path, CodecSrc::kNorma l_Mode, 216 push_src("image", "codec_kIndex8", new CodecSrc(path, CodecSrc::kNor mal_Mode,
215 CodecSrc::kIndex8_Always_DstColorType)); 217 CodecSrc::kIndex8_Always_DstColorType));
216 push_src("image", "scanline_kIndex8", new CodecSrc(path, CodecSrc::kSc anline_Mode, 218 push_src("image", "scanline_kIndex8", new CodecSrc(path, CodecSrc::k Scanline_Mode,
217 CodecSrc::kIndex8_Always_DstColorType)); 219 CodecSrc::kIndex8_Always_DstColorType));
220 push_src("image", "scanline_subset_kIndex8", new CodecSrc(path,
221 CodecSrc::kScanline_Subset_Mode, CodecSrc::kIndex8_Always_Ds tColorType));
218 break; 222 break;
msarett 2015/05/22 17:42:18 nit: The indentation is off here. You didn't caus
219 default: 223 default:
220 // Do nothing 224 // Do nothing
221 break; 225 break;
222 } 226 }
223 227
224 // Decode all images to the canvas color type 228 // Decode all images to the canvas color type
225 push_src("image", "codec", new CodecSrc(path, CodecSrc::kNormal_Mode, 229 push_src("image", "codec", new CodecSrc(path, CodecSrc::kNormal_Mode,
226 CodecSrc::kGetFromCanvas_DstColorType)); 230 CodecSrc::kGetFromCanvas_DstColorType));
227 push_src("image", "scanline", new CodecSrc(path, CodecSrc::kScanline_Mode, 231 push_src("image", "scanline", new CodecSrc(path, CodecSrc::kScanline_Mode,
228 CodecSrc::kGetFromCanvas_DstColorType)); 232 CodecSrc::kGetFromCanvas_DstColorType));
233 push_src("image", "scanline_subset", new CodecSrc(path, CodecSrc::kScanline_ Subset_Mode,
234 CodecSrc::kGetFromCanvas_DstColorType));
229 } 235 }
230 236
231 static bool codec_supported(const char* ext) { 237 static bool codec_supported(const char* ext) {
232 // FIXME: Once other versions of SkCodec are available, we can add them to t his 238 // FIXME: Once other versions of SkCodec are available, we can add them to t his
233 // list (and eventually we can remove this check once they are all supported ). 239 // list (and eventually we can remove this check once they are all supported ).
234 static const char* const exts[] = { 240 static const char* const exts[] = {
235 "bmp", "gif", "jpg", "jpeg", "png", "ico", "wbmp", 241 "bmp", "gif", "jpg", "jpeg", "png", "ico", "wbmp",
236 "BMP", "GIF", "JPG", "JPEG", "PNG", "ICO", "WBMP" 242 "BMP", "GIF", "JPG", "JPEG", "PNG", "ICO", "WBMP"
237 }; 243 };
238 244
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 } 764 }
759 return 0; 765 return 0;
760 } 766 }
761 767
762 #if !defined(SK_BUILD_FOR_IOS) 768 #if !defined(SK_BUILD_FOR_IOS)
763 int main(int argc, char** argv) { 769 int main(int argc, char** argv) {
764 SkCommandLineFlags::Parse(argc, argv); 770 SkCommandLineFlags::Parse(argc, argv);
765 return dm_main(); 771 return dm_main();
766 } 772 }
767 #endif 773 #endif
OLDNEW
« no previous file with comments | « no previous file | dm/DMSrcSink.h » ('j') | dm/DMSrcSink.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698