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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 renderer.init(picture, &writePathString, &mismatchPathString, &inputFilename
, | 199 renderer.init(picture, &writePathString, &mismatchPathString, &inputFilename
, |
200 FLAGS_writeChecksumBasedFilenames); | 200 FLAGS_writeChecksumBasedFilenames); |
201 | 201 |
202 if (FLAGS_preprocess) { | 202 if (FLAGS_preprocess) { |
203 if (NULL != renderer.getCanvas()) { | 203 if (NULL != renderer.getCanvas()) { |
204 renderer.getCanvas()->EXPERIMENTAL_optimize(renderer.getPicture()); | 204 renderer.getCanvas()->EXPERIMENTAL_optimize(renderer.getPicture()); |
205 } | 205 } |
206 } | 206 } |
207 | 207 |
208 renderer.setup(); | 208 renderer.setup(); |
| 209 renderer.enableWrites(); |
209 | 210 |
210 bool success = renderer.render(out); | 211 bool success = renderer.render(out); |
211 if (!success) { | 212 if (!success) { |
212 SkDebugf("Failed to render %s\n", inputFilename.c_str()); | 213 SkDebugf("Failed to render %s\n", inputFilename.c_str()); |
213 } | 214 } |
214 | 215 |
215 renderer.end(); | 216 renderer.end(); |
216 | 217 |
217 SkDELETE(picture); | 218 SkDELETE(picture); |
218 return success; | 219 return success; |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]); | 498 jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]); |
498 } | 499 } |
499 return 0; | 500 return 0; |
500 } | 501 } |
501 | 502 |
502 #if !defined SK_BUILD_FOR_IOS | 503 #if !defined SK_BUILD_FOR_IOS |
503 int main(int argc, char * const argv[]) { | 504 int main(int argc, char * const argv[]) { |
504 return tool_main(argc, (char**) argv); | 505 return tool_main(argc, (char**) argv); |
505 } | 506 } |
506 #endif | 507 #endif |
OLD | NEW |