From 2295c6332512833760060d803cf6ad19a28adc51 Mon Sep 17 00:00:00 2001 From: "reed@android.com" Date: Thu, 4 Mar 2010 21:38:50 +0000 Subject: [PATCH] update android specific RAM restrictions git-svn-id: http://skia.googlecode.com/svn/trunk@520 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/images/SkImageDecoder_libjpeg.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/images/SkImageDecoder_libjpeg.cpp b/src/images/SkImageDecoder_libjpeg.cpp index a64efbc4ac..ed523bb05f 100644 --- a/src/images/SkImageDecoder_libjpeg.cpp +++ b/src/images/SkImageDecoder_libjpeg.cpp @@ -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 -- 2.34.1