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

Side by Side Diff: tools/render_pictures_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 | « tests/ImageDecodingTest.cpp ('k') | tools/skdiff_utils.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 2012 Google Inc. 2 * Copyright 2012 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 "LazyDecodeBitmap.h" 8 #include "LazyDecodeBitmap.h"
9 #include "CopyTilesRenderer.h" 9 #include "CopyTilesRenderer.h"
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 SkImageDecoder::Format format = SkImageDecoder::GetStreamFormat(&memStream); 123 SkImageDecoder::Format format = SkImageDecoder::GetStreamFormat(&memStream);
124 SkString name = SkStringPrintf("%s_%d%s", gInputFileName.c_str(), gImageNo++ , 124 SkString name = SkStringPrintf("%s_%d%s", gInputFileName.c_str(), gImageNo++ ,
125 get_suffix_from_format(format)); 125 get_suffix_from_format(format));
126 SkString dir(FLAGS_writePath[0]); 126 SkString dir(FLAGS_writePath[0]);
127 outPath = SkOSPath::SkPathJoin(dir.c_str(), name.c_str()); 127 outPath = SkOSPath::SkPathJoin(dir.c_str(), name.c_str());
128 SkFILEWStream fileStream(outPath.c_str()); 128 SkFILEWStream fileStream(outPath.c_str());
129 if (!(fileStream.isValid() && fileStream.write(buffer, size))) { 129 if (!(fileStream.isValid() && fileStream.write(buffer, size))) {
130 SkDebugf("Failed to write encoded data to \"%s\"\n", outPath.c_str()); 130 SkDebugf("Failed to write encoded data to \"%s\"\n", outPath.c_str());
131 } 131 }
132 // Put in a dummy bitmap. 132 // Put in a dummy bitmap.
133 return SkImageDecoder::DecodeStream(&memStream, bitmap, SkBitmap::kNo_Config , 133 return SkImageDecoder::DecodeStream(&memStream, bitmap, kUnknown_SkColorType ,
134 SkImageDecoder::kDecodeBounds_Mode); 134 SkImageDecoder::kDecodeBounds_Mode);
135 } 135 }
136 136
137 //////////////////////////////////////////////////////////////////////////////// //////////////////// 137 //////////////////////////////////////////////////////////////////////////////// ////////////////////
138 138
139 /** 139 /**
140 * Called only by render_picture(). 140 * Called only by render_picture().
141 */ 141 */
142 static bool render_picture_internal(const SkString& inputPath, const SkString* w ritePath, 142 static bool render_picture_internal(const SkString& inputPath, const SkString* w ritePath,
143 const SkString* mismatchPath, 143 const SkString* mismatchPath,
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]); 494 jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]);
495 } 495 }
496 return 0; 496 return 0;
497 } 497 }
498 498
499 #if !defined SK_BUILD_FOR_IOS 499 #if !defined SK_BUILD_FOR_IOS
500 int main(int argc, char * const argv[]) { 500 int main(int argc, char * const argv[]) {
501 return tool_main(argc, (char**) argv); 501 return tool_main(argc, (char**) argv);
502 } 502 }
503 #endif 503 #endif
OLDNEW
« no previous file with comments | « tests/ImageDecodingTest.cpp ('k') | tools/skdiff_utils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698