Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(705)

Unified Diff: src/images/SkImageDecoder_libjpeg.cpp

Issue 1103313002: Eliminate the check for ANDROID_LARGE_MEMORY in jpeg decoders (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Never overwrite default memory Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/codec/SkJpegDecoderMgr.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageDecoder_libjpeg.cpp
diff --git a/src/images/SkImageDecoder_libjpeg.cpp b/src/images/SkImageDecoder_libjpeg.cpp
index d5303ec434e674318f37c8b852cf863f9745ff41..afeb81946a6f474a6680467503cec0509bea60cc 100644
--- a/src/images/SkImageDecoder_libjpeg.cpp
+++ b/src/images/SkImageDecoder_libjpeg.cpp
@@ -57,22 +57,6 @@ SK_CONF_DECLARE(bool, c_suppressJPEGImageDecoderErrors,
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
-static void overwrite_mem_buffer_size(jpeg_decompress_struct* cinfo) {
-#ifdef SK_BUILD_FOR_ANDROID
- /* Check if the device indicates that it has a large amount of system memory
- * if so, increase the memory allocation to 30MB instead of the default 5MB.
- */
-#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 // SK_BUILD_FOR_ANDROID
-}
-
-//////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////
-
static void do_nothing_emit_message(jpeg_common_struct*, int) {
/* do nothing */
}
@@ -84,7 +68,6 @@ static void initialize_info(jpeg_decompress_struct* cinfo, skjpeg_source_mgr* sr
SkASSERT(cinfo != NULL);
SkASSERT(src_mgr != NULL);
jpeg_create_decompress(cinfo);
- overwrite_mem_buffer_size(cinfo);
cinfo->src = src_mgr;
/* To suppress warnings with a SK_DEBUG binary, set the
* environment variable "skia_images_jpeg_suppressDecoderWarnings"
« no previous file with comments | « src/codec/SkJpegDecoderMgr.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698