| 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 261         SkAutoTDelete<SkWStream> stream(open_stream(outputDir, files[i])); | 261         SkAutoTDelete<SkWStream> stream(open_stream(outputDir, files[i])); | 
| 262         if (!stream.get()) { | 262         if (!stream.get()) { | 
| 263             ++failures; | 263             ++failures; | 
| 264             continue; | 264             continue; | 
| 265         } | 265         } | 
| 266         if (!pdf_to_stream(picture, stream.get(), encode_to_dct_data)) { | 266         if (!pdf_to_stream(picture, stream.get(), encode_to_dct_data)) { | 
| 267             SkDebugf("Error in PDF Serialization."); | 267             SkDebugf("Error in PDF Serialization."); | 
| 268             ++failures; | 268             ++failures; | 
| 269         } | 269         } | 
| 270 | 270 | 
| 271         int max_rss_kb = sk_tools::getMaxResidentSetSizeKB(); | 271         int max_rss_mb = sk_tools::getMaxResidentSetSizeMB(); | 
| 272         if (max_rss_kb >= 0) { | 272         if (max_rss_mb >= 0) { | 
| 273             SkDebugf(" %4dM peak rss", max_rss_kb / 1024); | 273             SkDebugf(" %4dM peak rss", max_rss_mb); | 
| 274         } | 274         } | 
| 275 | 275 | 
| 276         SkDebugf("\n"); | 276         SkDebugf("\n"); | 
| 277     } | 277     } | 
| 278     if (failures != 0) { | 278     if (failures != 0) { | 
| 279         SkDebugf("Failed to render %i of %i PDFs.\n", failures, files.count()); | 279         SkDebugf("Failed to render %i of %i PDFs.\n", failures, files.count()); | 
| 280         return 1; | 280         return 1; | 
| 281     } | 281     } | 
| 282 | 282 | 
| 283     return 0; | 283     return 0; | 
| (...skipping 13 matching lines...) Expand all  Loading... | 
| 297         return -1; | 297         return -1; | 
| 298     } | 298     } | 
| 299 #endif | 299 #endif | 
| 300     return 0; | 300     return 0; | 
| 301 } | 301 } | 
| 302 #if !defined SK_BUILD_FOR_IOS | 302 #if !defined SK_BUILD_FOR_IOS | 
| 303 int main(int argc, char * const argv[]) { | 303 int main(int argc, char * const argv[]) { | 
| 304     return tool_main(argc, (char**) argv); | 304     return tool_main(argc, (char**) argv); | 
| 305 } | 305 } | 
| 306 #endif | 306 #endif | 
| OLD | NEW | 
|---|