update android specific RAM restrictions

git-svn-id: http://skia.googlecode.com/svn/trunk@520 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@android.com 2010-03-04 21:38:50 +00:00
parent 3f1f06a26b
commit 2295c63325

View File

@ -99,14 +99,11 @@ private:
If so, use the memory size for jpeg decode.
*/
static void overwrite_mem_buffer_size(j_decompress_ptr cinfo) {
int len = 0;
char value[PROPERTY_VALUE_MAX];
int memCap;
len = property_get(KEY_MEM_CAP, value, "");
if (len > 0 && sscanf(value, "%d", &memCap) == 1) {
cinfo->mem->max_memory_to_use = memCap;
}
#ifdef ANDROID_LARGE_MEMORY_DEVICE
cinfo->mem->max_memory_to_use = 30 * 1024 * 1024;
#else
cinfo->mem->max_memory_to_use = 5 * 1024 * 1024;
#endif
}
#endif