OLD | NEW |
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 "SkCanvas.h" | 8 #include "SkCanvas.h" |
9 #include "SkCommandLineFlags.h" | 9 #include "SkCommandLineFlags.h" |
10 #include "SkDocument.h" | 10 #include "SkDocument.h" |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 } | 247 } |
248 | 248 |
249 SkAutoTUnref<SkPicture> picture( | 249 SkAutoTUnref<SkPicture> picture( |
250 SkPicture::CreateFromStream(&inputStream)); | 250 SkPicture::CreateFromStream(&inputStream)); |
251 if (NULL == picture.get()) { | 251 if (NULL == picture.get()) { |
252 SkDebugf("Could not read an SkPicture from %s\n", | 252 SkDebugf("Could not read an SkPicture from %s\n", |
253 files[i].c_str()); | 253 files[i].c_str()); |
254 ++failures; | 254 ++failures; |
255 continue; | 255 continue; |
256 } | 256 } |
257 SkDebugf("[%f,%f,%f,%f] %-*s", | 257 SkDebugf("[%6g %6g %6g %6g] %-*s", |
258 picture->cullRect().fLeft, picture->cullRect().fTop, | 258 picture->cullRect().fLeft, picture->cullRect().fTop, |
259 picture->cullRect().fRight, picture->cullRect().fBottom, | 259 picture->cullRect().fRight, picture->cullRect().fBottom, |
260 maximumPathLength, basename.c_str()); | 260 maximumPathLength, basename.c_str()); |
261 | 261 |
262 SkAutoTDelete<SkWStream> stream(open_stream(outputDir, files[i])); | 262 SkAutoTDelete<SkWStream> stream(open_stream(outputDir, files[i])); |
263 if (!stream.get()) { | 263 if (!stream.get()) { |
264 ++failures; | 264 ++failures; |
265 continue; | 265 continue; |
266 } | 266 } |
267 if (!pdf_to_stream(picture, stream.get(), encode_to_dct_data)) { | 267 if (!pdf_to_stream(picture, stream.get(), encode_to_dct_data)) { |
(...skipping 30 matching lines...) Expand all Loading... |
298 return -1; | 298 return -1; |
299 } | 299 } |
300 #endif | 300 #endif |
301 return 0; | 301 return 0; |
302 } | 302 } |
303 #if !defined SK_BUILD_FOR_IOS | 303 #if !defined SK_BUILD_FOR_IOS |
304 int main(int argc, char * const argv[]) { | 304 int main(int argc, char * const argv[]) { |
305 return tool_main(argc, (char**) argv); | 305 return tool_main(argc, (char**) argv); |
306 } | 306 } |
307 #endif | 307 #endif |
OLD | NEW |