MCPcopy Create free account
hub / github.com/CyanogenMod/android_frameworks_base / updatePreProcessedCache

Function updatePreProcessedCache

tools/aapt/Resource.cpp:855–882  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

853 } while (0)
854
855status_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
884status_t buildResources(Bundle* bundle, const sp<AaptAssets>& assets)
885{

Callers 1

doCrunchFunction · 0.85

Calls 3

getCrunchedOutputDirMethod · 0.80
getVerboseMethod · 0.80
crunchMethod · 0.45

Tested by

no test coverage detected