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

Side by Side Diff: dm/DM.cpp

Issue 1417583009: Combine native sampling with sampling (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Work around missing initializer_list on mac 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') | src/codec/SkAndroidCodec.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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 } 463 }
464 464
465 static void push_brd_srcs(Path path) { 465 static void push_brd_srcs(Path path) {
466 466
467 const SkBitmapRegionDecoderInterface::Strategy strategies[] = { 467 const SkBitmapRegionDecoderInterface::Strategy strategies[] = {
468 SkBitmapRegionDecoderInterface::kCanvas_Strategy, 468 SkBitmapRegionDecoderInterface::kCanvas_Strategy,
469 SkBitmapRegionDecoderInterface::kOriginal_Strategy, 469 SkBitmapRegionDecoderInterface::kOriginal_Strategy,
470 SkBitmapRegionDecoderInterface::kAndroidCodec_Strategy, 470 SkBitmapRegionDecoderInterface::kAndroidCodec_Strategy,
471 }; 471 };
472 472
473 const uint32_t sampleSizes[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; 473 // Test on a variety of sampleSizes, making sure to include:
474 // - 2, 4, and 8, which are natively supported by jpeg
475 // - multiples of 2 which are not divisible by 4 (analogous for 4)
476 // - larger powers of two, since BRD clients generally use powers of 2
477 // We will only produce output for the larger sizes on large images.
478 const uint32_t sampleSizes[] = { 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 24, 32, 64 };
474 479
475 // We will only test to one backend (8888), but we will test all of the 480 // We will only test to one backend (8888), but we will test all of the
476 // color types that we need to decode to on this backend. 481 // color types that we need to decode to on this backend.
477 const CodecSrc::DstColorType dstColorTypes[] = { 482 const CodecSrc::DstColorType dstColorTypes[] = {
478 CodecSrc::kGetFromCanvas_DstColorType, 483 CodecSrc::kGetFromCanvas_DstColorType,
479 CodecSrc::kIndex8_Always_DstColorType, 484 CodecSrc::kIndex8_Always_DstColorType,
480 CodecSrc::kGrayscale_Always_DstColorType, 485 CodecSrc::kGrayscale_Always_DstColorType,
481 }; 486 };
482 487
483 const BRDSrc::Mode modes[] = { 488 const BRDSrc::Mode modes[] = {
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 #endif // SK_PDF_IMAGE_STATS 1170 #endif // SK_PDF_IMAGE_STATS
1166 return 0; 1171 return 0;
1167 } 1172 }
1168 1173
1169 #if !defined(SK_BUILD_FOR_IOS) 1174 #if !defined(SK_BUILD_FOR_IOS)
1170 int main(int argc, char** argv) { 1175 int main(int argc, char** argv) {
1171 SkCommandLineFlags::Parse(argc, argv); 1176 SkCommandLineFlags::Parse(argc, argv);
1172 return dm_main(); 1177 return dm_main();
1173 } 1178 }
1174 #endif 1179 #endif
OLDNEW
« no previous file with comments | « bench/nanobench.cpp ('k') | src/codec/SkAndroidCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698