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

Side by Side Diff: experimental/PdfViewer/chop_transparency_main.cpp

Issue 334793002: hide Config in SkImageDecoder -- use SkColorType instead (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix warning Created 6 years, 6 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 | « bench/DecodeBench.cpp ('k') | gm/cmykjpeg.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 "SkBitmap.h" 8 #include "SkBitmap.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkCommandLineFlags.h" 10 #include "SkCommandLineFlags.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 SkImageDecoder* codec = SkImageDecoder::Factory(&stream); 102 SkImageDecoder* codec = SkImageDecoder::Factory(&stream);
103 if (NULL == codec) { 103 if (NULL == codec) {
104 return; 104 return;
105 } 105 }
106 106
107 SkAutoTDelete<SkImageDecoder> ad(codec); 107 SkAutoTDelete<SkImageDecoder> ad(codec);
108 108
109 stream.rewind(); 109 stream.rewind();
110 110
111 if (!codec->decode(&stream, &bitmap, SkBitmap::kARGB_8888_Config, 111 if (!codec->decode(&stream, &bitmap, kN32_SkColorType, SkImageDecoder::kDeco dePixels_Mode)) {
112 SkImageDecoder::kDecodePixels_Mode)) {
113 return; 112 return;
114 } 113 }
115 114
116 write_bitmap(srcPath, bitmap); 115 write_bitmap(srcPath, bitmap);
117 } 116 }
118 117
119 /** 118 /**
120 * Return true if the filename represents an image. 119 * Return true if the filename represents an image.
121 */ 120 */
122 static bool is_image_file(const char* filename) { 121 static bool is_image_file(const char* filename) {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 166 }
168 167
169 return 0; 168 return 0;
170 } 169 }
171 170
172 #if !defined SK_BUILD_FOR_IOS 171 #if !defined SK_BUILD_FOR_IOS
173 int main(int argc, char * const argv[]) { 172 int main(int argc, char * const argv[]) {
174 return tool_main(argc, (char**) argv); 173 return tool_main(argc, (char**) argv);
175 } 174 }
176 #endif 175 #endif
OLDNEW
« no previous file with comments | « bench/DecodeBench.cpp ('k') | gm/cmykjpeg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698