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

Unified Diff: src/codec/SkJpegDecoderMgr.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 | « platform_tools/android/tests/expectations/Android.mk ('k') | src/images/SkImageDecoder_libjpeg.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkJpegDecoderMgr.cpp
diff --git a/src/codec/SkJpegDecoderMgr.cpp b/src/codec/SkJpegDecoderMgr.cpp
index c1f044c64f98001d261779b959d715e04420fdae..e60f4663379abcc094360b237b228c9140438be1 100644
--- a/src/codec/SkJpegDecoderMgr.cpp
+++ b/src/codec/SkJpegDecoderMgr.cpp
@@ -27,23 +27,6 @@ static void output_message(j_common_ptr info) {
print_message(info, "output_message");
}
-/*
- * Choose the size of the memory buffer on Android
- */
-static void overwrite_mem_buffer_size(jpeg_decompress_struct* dinfo) {
-#ifdef SK_BUILD_FOR_ANDROID
-
-// Use 30 MB for devices with a large amount of system memory and 5MB otherwise
-// TODO: (msarett) This matches SkImageDecoder. Why were these values chosen?
-#ifdef ANDROID_LARGE_MEMORY_DEVICE
- dinfo->mem->max_memory_to_use = 30 * 1024 * 1024;
-#else
- dinfo->mem->max_memory_to_use = 5 * 1024 * 1024;
-#endif
-
-#endif // SK_BUILD_FOR_ANDROID
-}
-
bool JpegDecoderMgr::returnFalse(const char caller[]) {
print_message((j_common_ptr) &fDInfo, caller);
return false;
@@ -89,7 +72,6 @@ void JpegDecoderMgr::init() {
jpeg_create_decompress(&fDInfo);
fInit = true;
fDInfo.src = &fSrcMgr;
- overwrite_mem_buffer_size(&fDInfo);
fDInfo.err->emit_message = &emit_message;
fDInfo.err->output_message = &output_message;
}
« no previous file with comments | « platform_tools/android/tests/expectations/Android.mk ('k') | src/images/SkImageDecoder_libjpeg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698