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

Side by Side Diff: dm/DM.cpp

Issue 1022673011: Creating a new wrapper for gif decoder (Closed) Base URL: https://skia.googlesource.com/skia.git@ico-real
Patch Set: Warnings mostly disabled Created 5 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 | gyp/codec.gyp » ('j') | gyp/giflib.gyp » ('J')
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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 !SkCommandLineFlags::ShouldSkip(FLAGS_match, src->name().c_str())) { 146 !SkCommandLineFlags::ShouldSkip(FLAGS_match, src->name().c_str())) {
147 Tagged<Src>& s = gSrcs.push_back(); 147 Tagged<Src>& s = gSrcs.push_back();
148 s.reset(src.detach()); 148 s.reset(src.detach());
149 s.tag = tag; 149 s.tag = tag;
150 } 150 }
151 } 151 }
152 152
153 static bool codec_supported(const char* ext) { 153 static bool codec_supported(const char* ext) {
154 // FIXME: Once other versions of SkCodec are available, we can add them to t his 154 // FIXME: Once other versions of SkCodec are available, we can add them to t his
155 // list (and eventually we can remove this check once they are all supported ). 155 // list (and eventually we can remove this check once they are all supported ).
156 return strcmp(ext, "png") == 0 || strcmp(ext, "PNG") == 0 || 156 static const char* const exts[] = {
157 strcmp(ext, "bmp") == 0 || strcmp(ext, "BMP") == 0 || 157 "bmp", "gif", "png", "ico", "wbmp",
158 strcmp(ext, "ico") == 0 || strcmp(ext, "ICO") == 0 || 158 "BMP", "GIF", "PNG", "ICO", "WBMP"
159 strcmp(ext, "wbmp") == 0 || strcmp(ext, "WBMP") == 0; 159 };
160
161 for (uint32_t i = 0; i < SK_ARRAY_COUNT(exts); i++) {
162 if (0 == strcmp(exts[i], ext)) {
163 return true;
164 }
165 }
166 return false;
160 } 167 }
161 168
162 static void gather_srcs() { 169 static void gather_srcs() {
163 for (const skiagm::GMRegistry* r = skiagm::GMRegistry::Head(); r; r = r->nex t()) { 170 for (const skiagm::GMRegistry* r = skiagm::GMRegistry::Head(); r; r = r->nex t()) {
164 push_src("gm", new GMSrc(r->factory())); 171 push_src("gm", new GMSrc(r->factory()));
165 } 172 }
166 for (int i = 0; i < FLAGS_skps.count(); i++) { 173 for (int i = 0; i < FLAGS_skps.count(); i++) {
167 const char* path = FLAGS_skps[i]; 174 const char* path = FLAGS_skps[i];
168 if (sk_isdir(path)) { 175 if (sk_isdir(path)) {
169 SkOSFile::Iter it(path, "skp"); 176 SkOSFile::Iter it(path, "skp");
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 } 656 }
650 return 0; 657 return 0;
651 } 658 }
652 659
653 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 660 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
654 int main(int argc, char** argv) { 661 int main(int argc, char** argv) {
655 SkCommandLineFlags::Parse(argc, argv); 662 SkCommandLineFlags::Parse(argc, argv);
656 return dm_main(); 663 return dm_main();
657 } 664 }
658 #endif 665 #endif
OLDNEW
« no previous file with comments | « no previous file | gyp/codec.gyp » ('j') | gyp/giflib.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698