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

Side by Side Diff: dm/DM.cpp

Issue 1214023003: 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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded)); 202 SkAutoTDelete<SkCodec> codec(SkCodec::NewFromData(encoded));
203 if (NULL == codec.get()) { 203 if (NULL == codec.get()) {
204 SkDebugf("Couldn't create codec for %s.", path.c_str()); 204 SkDebugf("Couldn't create codec for %s.", path.c_str());
205 return; 205 return;
206 } 206 }
207 207
208 // Choose scales for scaling tests. 208 // Choose scales for scaling tests.
209 // TODO (msarett): Add more scaling tests as we implement more flexible scal ing. 209 // TODO (msarett): Add more scaling tests as we implement more flexible scal ing.
210 // TODO (msarett): Implement scaling tests for SkImageDecoder in order to co mpare with these 210 // TODO (msarett): Implement scaling tests for SkImageDecoder in order to co mpare with these
211 // tests. SkImageDecoder supports downscales by integer fac tors. 211 // tests. SkImageDecoder supports downscales by integer fac tors.
212 const float scales[] = { 0.125f, 0.25f, 0.375f, 0.5f, 0.625f, 0.750f, 0.875f , 1.0f }; 212 const float scales[] = { 0.125f, 0.25f, 0.5f, 1.0f };
213 213
214 for (float scale : scales) { 214 for (float scale : scales) {
215 // Build additional test cases for images that decode natively to non-ca nvas types 215 // Build additional test cases for images that decode natively to non-ca nvas types
216 switch(codec->getInfo().colorType()) { 216 switch(codec->getInfo().colorType()) {
217 case kGray_8_SkColorType: 217 case kGray_8_SkColorType:
218 push_src("image", "codec_kGray8", new CodecSrc(path, CodecSrc::k Normal_Mode, 218 push_src("image", "codec_kGray8", new CodecSrc(path, CodecSrc::k Normal_Mode,
219 CodecSrc::kGrayscale_Always_DstColorType, scale)); 219 CodecSrc::kGrayscale_Always_DstColorType, scale));
220 push_src("image", "scanline_kGray8", new CodecSrc(path, CodecSrc ::kScanline_Mode, 220 push_src("image", "scanline_kGray8", new CodecSrc(path, CodecSrc ::kScanline_Mode,
221 CodecSrc::kGrayscale_Always_DstColorType, scale)); 221 CodecSrc::kGrayscale_Always_DstColorType, scale));
222 push_src("image", "scanline_subset_kGray8", new CodecSrc(path, 222 push_src("image", "scanline_subset_kGray8", new CodecSrc(path,
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after
814 } 814 }
815 return 0; 815 return 0;
816 } 816 }
817 817
818 #if !defined(SK_BUILD_FOR_IOS) 818 #if !defined(SK_BUILD_FOR_IOS)
819 int main(int argc, char** argv) { 819 int main(int argc, char** argv) {
820 SkCommandLineFlags::Parse(argc, argv); 820 SkCommandLineFlags::Parse(argc, argv);
821 return dm_main(); 821 return dm_main();
822 } 822 }
823 #endif 823 #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