summaryrefslogtreecommitdiffstats
path: root/tools/aapt/Package.cpp
diff options
context:
space:
mode:
authorJosiah Gaskin <josiahgaskin@google.com>2011-06-06 17:00:35 -0700
committerJosiah Gaskin <josiahgaskin@google.com>2011-07-20 15:20:26 -0700
commit8a39da80b33691b0c82458c3b7727e13ff71277e (patch)
treeb6fa94370ecb2dba85d5fdb45c83729cef8708e1 /tools/aapt/Package.cpp
parent1e24ccbdd56a45c8bb5f2eba94af5aecd2d02554 (diff)
downloadframeworks_base-8a39da80b33691b0c82458c3b7727e13ff71277e.zip
frameworks_base-8a39da80b33691b0c82458c3b7727e13ff71277e.tar.gz
frameworks_base-8a39da80b33691b0c82458c3b7727e13ff71277e.tar.bz2
Added Caching for PreProcessed PNGs
Added a cache management system for pre-processed PNG files along with unit tests. The cache system will be used if the --no-crunch flag is passed to AAPT during the package phase. The cache can be updated by a call to 'aapt crunch' (see usage statement). Also put in benchmarking code. Change-Id: I58271fb2ee2f5f9075fd74d4ff6f15e7afabd05c
Diffstat (limited to 'tools/aapt/Package.cpp')
-rw-r--r--tools/aapt/Package.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/aapt/Package.cpp b/tools/aapt/Package.cpp
index 6e2a25c..62af30e 100644
--- a/tools/aapt/Package.cpp
+++ b/tools/aapt/Package.cpp
@@ -50,6 +50,11 @@ ssize_t processJarFiles(Bundle* bundle, ZipFile* zip);
status_t writeAPK(Bundle* bundle, const sp<AaptAssets>& assets,
const String8& outputFile)
{
+ #if BENCHMARK
+ fprintf(stdout, "BENCHMARK: Starting APK Bundling \n");
+ long startAPKTime = clock();
+ #endif /* BENCHMARK */
+
status_t result = NO_ERROR;
ZipFile* zip = NULL;
int count;
@@ -197,6 +202,10 @@ bail:
if (result == NO_ERROR && bundle->getVerbose())
printf("Done!\n");
+
+ #if BENCHMARK
+ fprintf(stdout, "BENCHMARK: End APK Bundling. Time Elapsed: %f ms \n",(clock() - startAPKTime)/1000.0);
+ #endif /* BENCHMARK */
return result;
}