summaryrefslogtreecommitdiff
path: root/tools/aapt/Images.cpp
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-03-16 22:17:41 -0700
committerJeff Brown <jeffbrown@google.com>2012-03-17 14:12:57 -0700
commitc0f7366a15655c6973ea21029f1997f24c006cca (patch)
treead9302a32cfbfa603ce5b58a6fa263c92953795a /tools/aapt/Images.cpp
parentc9fd9263feedac32e4f5b1f13a3246347efdc25f (diff)
aapt: Preprocess images in parallel.
Currently hardcoded to use up to 4 threads. This change substantially reduces the amount of time spent preprocessing framework resources to just a few seconds. Change-Id: I02fdd283fb529a152aeb22ac87f278779fd77983
Diffstat (limited to 'tools/aapt/Images.cpp')
-rw-r--r--tools/aapt/Images.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/aapt/Images.cpp b/tools/aapt/Images.cpp
index 6402e3cb38d8..2b9b056776dc 100644
--- a/tools/aapt/Images.cpp
+++ b/tools/aapt/Images.cpp
@@ -964,7 +964,7 @@ static void write_png(const char* imageName,
compression_type));
}
-status_t preProcessImage(Bundle* bundle, const sp<AaptAssets>& assets,
+status_t preProcessImage(const Bundle* bundle, const sp<AaptAssets>& assets,
const sp<AaptFile>& file, String8* outNewLeafName)
{
String8 ext(file->getPath().getPathExtension());
@@ -1084,7 +1084,7 @@ bail:
return error;
}
-status_t preProcessImageToCache(Bundle* bundle, String8 source, String8 dest)
+status_t preProcessImageToCache(const Bundle* bundle, const String8& source, const String8& dest)
{
png_structp read_ptr = NULL;
png_infop read_info = NULL;