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 "LazyDecodeBitmap.h" | 8 #include "LazyDecodeBitmap.h" |
9 #include "CopyTilesRenderer.h" | 9 #include "CopyTilesRenderer.h" |
10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 } | 205 } |
206 | 206 |
207 renderer.setup(); | 207 renderer.setup(); |
208 renderer.enableWrites(); | 208 renderer.enableWrites(); |
209 | 209 |
210 bool success = renderer.render(out); | 210 bool success = renderer.render(out); |
211 if (!success) { | 211 if (!success) { |
212 SkDebugf("Failed to render %s\n", inputFilename.c_str()); | 212 SkDebugf("Failed to render %s\n", inputFilename.c_str()); |
213 } | 213 } |
214 | 214 |
215 if (FLAGS_preprocess) { | |
216 if (NULL != renderer.getCanvas()) { | |
217 renderer.getCanvas()->EXPERIMENTAL_purge(renderer.getPicture()); | |
218 } | |
219 } | |
220 | |
221 renderer.end(); | 215 renderer.end(); |
222 | 216 |
223 SkDELETE(picture); | 217 SkDELETE(picture); |
224 return success; | 218 return success; |
225 } | 219 } |
226 | 220 |
227 static inline int getByte(uint32_t value, int index) { | 221 static inline int getByte(uint32_t value, int index) { |
228 SkASSERT(0 <= index && index < 4); | 222 SkASSERT(0 <= index && index < 4); |
229 return (value >> (index * 8)) & 0xFF; | 223 return (value >> (index * 8)) & 0xFF; |
230 } | 224 } |
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
500 jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]); | 494 jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]); |
501 } | 495 } |
502 return 0; | 496 return 0; |
503 } | 497 } |
504 | 498 |
505 #if !defined SK_BUILD_FOR_IOS | 499 #if !defined SK_BUILD_FOR_IOS |
506 int main(int argc, char * const argv[]) { | 500 int main(int argc, char * const argv[]) { |
507 return tool_main(argc, (char**) argv); | 501 return tool_main(argc, (char**) argv); |
508 } | 502 } |
509 #endif | 503 #endif |
OLD | NEW |