| 853 | } while (0) |
| 854 | |
| 855 | status_t updatePreProcessedCache(Bundle* bundle) |
| 856 | { |
| 857 | #if BENCHMARK |
| 858 | fprintf(stdout, "BENCHMARK: Starting PNG PreProcessing \n"); |
| 859 | long startPNGTime = clock(); |
| 860 | #endif /* BENCHMARK */ |
| 861 | |
| 862 | String8 source(bundle->getResourceSourceDirs()[0]); |
| 863 | String8 dest(bundle->getCrunchedOutputDir()); |
| 864 | |
| 865 | FileFinder* ff = new SystemFileFinder(); |
| 866 | CrunchCache cc(source,dest,ff); |
| 867 | |
| 868 | CacheUpdater* cu = new SystemCacheUpdater(bundle); |
| 869 | size_t numFiles = cc.crunch(cu); |
| 870 | |
| 871 | if (bundle->getVerbose()) |
| 872 | fprintf(stdout, "Crunched %d PNG files to update cache\n", (int)numFiles); |
| 873 | |
| 874 | delete ff; |
| 875 | delete cu; |
| 876 | |
| 877 | #if BENCHMARK |
| 878 | fprintf(stdout, "BENCHMARK: End PNG PreProcessing. Time Elapsed: %f ms \n" |
| 879 | ,(clock() - startPNGTime)/1000.0); |
| 880 | #endif /* BENCHMARK */ |
| 881 | return 0; |
| 882 | } |
| 883 | |
| 884 | status_t buildResources(Bundle* bundle, const sp<AaptAssets>& assets) |
| 885 | { |
no test coverage detected