| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 198     } | 198     } | 
| 199 | 199 | 
| 200     renderer.setup(); | 200     renderer.setup(); | 
| 201     renderer.enableWrites(); | 201     renderer.enableWrites(); | 
| 202 | 202 | 
| 203     bool success = renderer.render(out); | 203     bool success = renderer.render(out); | 
| 204     if (!success) { | 204     if (!success) { | 
| 205         SkDebugf("Failed to render %s\n", inputFilename.c_str()); | 205         SkDebugf("Failed to render %s\n", inputFilename.c_str()); | 
| 206     } | 206     } | 
| 207 | 207 | 
| 208     if (FLAGS_preprocess) { |  | 
| 209         if (NULL != renderer.getCanvas()) { |  | 
| 210             renderer.getCanvas()->EXPERIMENTAL_purge(renderer.getPicture()); |  | 
| 211         } |  | 
| 212     } |  | 
| 213 |  | 
| 214     renderer.end(); | 208     renderer.end(); | 
| 215 | 209 | 
| 216     SkDELETE(picture); | 210     SkDELETE(picture); | 
| 217     return success; | 211     return success; | 
| 218 } | 212 } | 
| 219 | 213 | 
| 220 static inline int getByte(uint32_t value, int index) { | 214 static inline int getByte(uint32_t value, int index) { | 
| 221     SkASSERT(0 <= index && index < 4); | 215     SkASSERT(0 <= index && index < 4); | 
| 222     return (value >> (index * 8)) & 0xFF; | 216     return (value >> (index * 8)) & 0xFF; | 
| 223 } | 217 } | 
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 488         jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]); | 482         jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]); | 
| 489     } | 483     } | 
| 490     return 0; | 484     return 0; | 
| 491 } | 485 } | 
| 492 | 486 | 
| 493 #if !defined SK_BUILD_FOR_IOS | 487 #if !defined SK_BUILD_FOR_IOS | 
| 494 int main(int argc, char * const argv[]) { | 488 int main(int argc, char * const argv[]) { | 
| 495     return tool_main(argc, (char**) argv); | 489     return tool_main(argc, (char**) argv); | 
| 496 } | 490 } | 
| 497 #endif | 491 #endif | 
| OLD | NEW | 
|---|