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

Side by Side Diff: dm/DM.cpp

Issue 1923533002: Remove redundant tests to make DM a little faster (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Test all alpha modes Created 4 years, 8 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 | no next file » | 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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 for (float scale : nativeScales) { 540 for (float scale : nativeScales) {
541 for (CodecSrc::DstColorType colorType : colorTypes) { 541 for (CodecSrc::DstColorType colorType : colorTypes) {
542 for (SkAlphaType alphaType : alphaModes) { 542 for (SkAlphaType alphaType : alphaModes) {
543 // Only test kCroppedScanline_Mode when the alpha type is op aque. The test is 543 // Only test kCroppedScanline_Mode when the alpha type is op aque. The test is
544 // slow and won't be interestingly different with different alpha types. 544 // slow and won't be interestingly different with different alpha types.
545 if (CodecSrc::kCroppedScanline_Mode == mode && 545 if (CodecSrc::kCroppedScanline_Mode == mode &&
546 kOpaque_SkAlphaType != alphaType) { 546 kOpaque_SkAlphaType != alphaType) {
547 continue; 547 continue;
548 } 548 }
549 549
550 // Skip kNonNative on different native scales. It won't be interestingly
551 // different.
552 if (CodecSrc::kNonNative8888_Always_DstColorType == colorTyp e && 1.0f != scale)
553 {
554 continue;
555 }
556
550 push_codec_src(path, mode, colorType, alphaType, scale); 557 push_codec_src(path, mode, colorType, alphaType, scale);
551 } 558 }
552 } 559 }
553 } 560 }
554 } 561 }
555 562
556 if (FLAGS_simpleCodec) { 563 if (FLAGS_simpleCodec) {
557 return; 564 return;
558 } 565 }
559 566
(...skipping 10 matching lines...) Expand all
570 subset = true; 577 subset = true;
571 break; 578 break;
572 } 579 }
573 } 580 }
574 581
575 const int sampleSizes[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; 582 const int sampleSizes[] = { 1, 2, 3, 4, 5, 6, 7, 8 };
576 583
577 for (int sampleSize : sampleSizes) { 584 for (int sampleSize : sampleSizes) {
578 for (CodecSrc::DstColorType colorType : colorTypes) { 585 for (CodecSrc::DstColorType colorType : colorTypes) {
579 for (SkAlphaType alphaType : alphaModes) { 586 for (SkAlphaType alphaType : alphaModes) {
587 // We can exercise all of the kNonNative support code in the swi zzler with just a
588 // few sample sizes. Skip the rest.
589 if (CodecSrc::kNonNative8888_Always_DstColorType == colorType && sampleSize > 3) {
590 continue;
591 }
592
580 push_android_codec_src(path, AndroidCodecSrc::kFullImage_Mode, c olorType, 593 push_android_codec_src(path, AndroidCodecSrc::kFullImage_Mode, c olorType,
581 alphaType, sampleSize); 594 alphaType, sampleSize);
582 if (subset) { 595 if (subset) {
583 push_android_codec_src(path, AndroidCodecSrc::kDivisor_Mode, colorType, 596 push_android_codec_src(path, AndroidCodecSrc::kDivisor_Mode, colorType,
584 alphaType, sampleSize); 597 alphaType, sampleSize);
585 } 598 }
586 } 599 }
587 } 600 }
588 } 601 }
589 602
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 #endif 1431 #endif
1419 } 1432 }
1420 } // namespace skiatest 1433 } // namespace skiatest
1421 1434
1422 #if !defined(SK_BUILD_FOR_IOS) 1435 #if !defined(SK_BUILD_FOR_IOS)
1423 int main(int argc, char** argv) { 1436 int main(int argc, char** argv) {
1424 SkCommandLineFlags::Parse(argc, argv); 1437 SkCommandLineFlags::Parse(argc, argv);
1425 return dm_main(); 1438 return dm_main();
1426 } 1439 }
1427 #endif 1440 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698