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

Side by Side Diff: dm/DM.cpp

Issue 1226543003: Revert of Switch SkJpegCode to libjpeg-turbo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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 | « DEPS ('k') | gyp/codec.gyp » ('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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded)); 201 SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded));
202 if (NULL == codec.get()) { 202 if (NULL == codec.get()) {
203 SkDebugf("Couldn't create codec for %s.", path.c_str()); 203 SkDebugf("Couldn't create codec for %s.", path.c_str());
204 return; 204 return;
205 } 205 }
206 206
207 // Choose scales for scaling tests. 207 // Choose scales for scaling tests.
208 // TODO (msarett): Add more scaling tests as we implement more flexible scal ing. 208 // TODO (msarett): Add more scaling tests as we implement more flexible scal ing.
209 // TODO (msarett): Implement scaling tests for SkImageDecoder in order to co mpare with these 209 // TODO (msarett): Implement scaling tests for SkImageDecoder in order to co mpare with these
210 // tests. SkImageDecoder supports downscales by integer fac tors. 210 // tests. SkImageDecoder supports downscales by integer fac tors.
211 const float scales[] = { 0.125f, 0.25f, 0.375f, 0.5f, 0.625f, 0.750f, 0.875f , 1.0f }; 211 const float scales[] = { 0.125f, 0.25f, 0.5f, 1.0f };
212 212
213 for (float scale : scales) { 213 for (float scale : scales) {
214 // Build additional test cases for images that decode natively to non-ca nvas types 214 // Build additional test cases for images that decode natively to non-ca nvas types
215 switch(codec->getInfo().colorType()) { 215 switch(codec->getInfo().colorType()) {
216 case kGray_8_SkColorType: 216 case kGray_8_SkColorType:
217 push_src("image", "codec_kGray8", new CodecSrc(path, CodecSrc::k Normal_Mode, 217 push_src("image", "codec_kGray8", new CodecSrc(path, CodecSrc::k Normal_Mode,
218 CodecSrc::kGrayscale_Always_DstColorType, scale)); 218 CodecSrc::kGrayscale_Always_DstColorType, scale));
219 push_src("image", "scanline_kGray8", new CodecSrc(path, CodecSrc ::kScanline_Mode, 219 push_src("image", "scanline_kGray8", new CodecSrc(path, CodecSrc ::kScanline_Mode,
220 CodecSrc::kGrayscale_Always_DstColorType, scale)); 220 CodecSrc::kGrayscale_Always_DstColorType, scale));
221 push_src("image", "scanline_subset_kGray8", new CodecSrc(path, 221 push_src("image", "scanline_subset_kGray8", new CodecSrc(path,
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 } 810 }
811 return 0; 811 return 0;
812 } 812 }
813 813
814 #if !defined(SK_BUILD_FOR_IOS) 814 #if !defined(SK_BUILD_FOR_IOS)
815 int main(int argc, char** argv) { 815 int main(int argc, char** argv) {
816 SkCommandLineFlags::Parse(argc, argv); 816 SkCommandLineFlags::Parse(argc, argv);
817 return dm_main(); 817 return dm_main();
818 } 818 }
819 #endif 819 #endif
OLDNEW
« no previous file with comments | « DEPS ('k') | gyp/codec.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698