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

Side by Side Diff: dm/DM.cpp

Issue 1432503003: Comments Style: s/skbug.com/bug.skia.org/ (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: include Created 5 years, 1 month 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 | « bench/nanobench.cpp ('k') | gm/aaclip.cpp » ('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 "CrashHandler.h" 8 #include "CrashHandler.h"
9 #include "DMJsonWriter.h" 9 #include "DMJsonWriter.h"
10 #include "DMSrcSink.h" 10 #include "DMSrcSink.h"
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 const float nativeScales[] = { 0.125f, 0.25f, 0.375f, 0.5f, 0.625f, 0.750f, 0.875f, 1.0f }; 311 const float nativeScales[] = { 0.125f, 0.25f, 0.375f, 0.5f, 0.625f, 0.750f, 0.875f, 1.0f };
312 312
313 const CodecSrc::Mode nativeModes[] = { CodecSrc::kCodec_Mode, CodecSrc::kSca nline_Mode, 313 const CodecSrc::Mode nativeModes[] = { CodecSrc::kCodec_Mode, CodecSrc::kSca nline_Mode,
314 CodecSrc::kScanline_Subset_Mode, CodecSrc::kStripe_Mode, CodecSrc::k Subset_Mode }; 314 CodecSrc::kScanline_Subset_Mode, CodecSrc::kStripe_Mode, CodecSrc::k Subset_Mode };
315 315
316 CodecSrc::DstColorType colorTypes[3]; 316 CodecSrc::DstColorType colorTypes[3];
317 uint32_t numColorTypes; 317 uint32_t numColorTypes;
318 switch (codec->getInfo().colorType()) { 318 switch (codec->getInfo().colorType()) {
319 case kGray_8_SkColorType: 319 case kGray_8_SkColorType:
320 // FIXME: Is this a long term solution for testing wbmps decodes to kIndex8? 320 // FIXME: Is this a long term solution for testing wbmps decodes to kIndex8?
321 // Further discussion on this topic is at skbug.com/3683. 321 // Further discussion on this topic is at https://bug.skia.org/3683 .
322 // This causes us to try to convert grayscale jpegs to kIndex8. We currently 322 // This causes us to try to convert grayscale jpegs to kIndex8. We currently
323 // fail non-fatally in this case. 323 // fail non-fatally in this case.
324 colorTypes[0] = CodecSrc::kGetFromCanvas_DstColorType; 324 colorTypes[0] = CodecSrc::kGetFromCanvas_DstColorType;
325 colorTypes[1] = CodecSrc::kGrayscale_Always_DstColorType; 325 colorTypes[1] = CodecSrc::kGrayscale_Always_DstColorType;
326 colorTypes[2] = CodecSrc::kIndex8_Always_DstColorType; 326 colorTypes[2] = CodecSrc::kIndex8_Always_DstColorType;
327 numColorTypes = 3; 327 numColorTypes = 3;
328 break; 328 break;
329 case kIndex_8_SkColorType: 329 case kIndex_8_SkColorType:
330 colorTypes[0] = CodecSrc::kGetFromCanvas_DstColorType; 330 colorTypes[0] = CodecSrc::kGetFromCanvas_DstColorType;
331 colorTypes[1] = CodecSrc::kIndex8_Always_DstColorType; 331 colorTypes[1] = CodecSrc::kIndex8_Always_DstColorType;
332 numColorTypes = 2; 332 numColorTypes = 2;
333 break; 333 break;
334 default: 334 default:
335 colorTypes[0] = CodecSrc::kGetFromCanvas_DstColorType; 335 colorTypes[0] = CodecSrc::kGetFromCanvas_DstColorType;
336 numColorTypes = 1; 336 numColorTypes = 1;
337 break; 337 break;
338 } 338 }
339 339
340 for (float scale : nativeScales) { 340 for (float scale : nativeScales) {
341 for (CodecSrc::Mode mode : nativeModes) { 341 for (CodecSrc::Mode mode : nativeModes) {
342 for (uint32_t i = 0; i < numColorTypes; i++) { 342 for (uint32_t i = 0; i < numColorTypes; i++) {
343 push_codec_src(path, mode, colorTypes[i], scale); 343 push_codec_src(path, mode, colorTypes[i], scale);
344 } 344 }
345 } 345 }
346 } 346 }
347 347
348 // skbug.com/4428 348 // https://bug.skia.org/4428
349 static const char* const exts[] = { 349 static const char* const exts[] = {
350 "jpg", "jpeg", "png", "webp", 350 "jpg", "jpeg", "png", "webp",
351 "JPG", "JPEG", "PNG", "WEBP", 351 "JPG", "JPEG", "PNG", "WEBP",
352 }; 352 };
353 bool supported = false; 353 bool supported = false;
354 for (const char* ext : exts) { 354 for (const char* ext : exts) {
355 if (path.endsWith(ext)) { 355 if (path.endsWith(ext)) {
356 supported = true; 356 supported = true;
357 break; 357 break;
358 } 358 }
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 #endif // SK_PDF_IMAGE_STATS 1164 #endif // SK_PDF_IMAGE_STATS
1165 return 0; 1165 return 0;
1166 } 1166 }
1167 1167
1168 #if !defined(SK_BUILD_FOR_IOS) 1168 #if !defined(SK_BUILD_FOR_IOS)
1169 int main(int argc, char** argv) { 1169 int main(int argc, char** argv) {
1170 SkCommandLineFlags::Parse(argc, argv); 1170 SkCommandLineFlags::Parse(argc, argv);
1171 return dm_main(); 1171 return dm_main();
1172 } 1172 }
1173 #endif 1173 #endif
OLDNEW
« no previous file with comments | « bench/nanobench.cpp ('k') | gm/aaclip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698