| Index: webkit/child/webkitplatformsupport_impl.cc
|
| diff --git a/webkit/child/webkitplatformsupport_impl.cc b/webkit/child/webkitplatformsupport_impl.cc
|
| index 5b70672ffc103033b1893bcf5da8744b54ea811a..a03101c14b741825e6e93cf8734787004fcaf50b 100644
|
| --- a/webkit/child/webkitplatformsupport_impl.cc
|
| +++ b/webkit/child/webkitplatformsupport_impl.cc
|
| @@ -25,6 +25,7 @@
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "base/synchronization/lock.h"
|
| #include "base/sys_info.h"
|
| +#include "base/sys_utils.h"
|
| #include "base/time/time.h"
|
| #include "grit/blink_resources.h"
|
| #include "grit/webkit_resources.h"
|
| @@ -49,10 +50,6 @@
|
| #include "webkit/child/weburlloader_impl.h"
|
| #include "webkit/common/user_agent/user_agent.h"
|
|
|
| -#if defined(OS_ANDROID)
|
| -#include "base/android/sys_utils.h"
|
| -#endif
|
| -
|
| #if !defined(NO_TCMALLOC) && defined(USE_TCMALLOC) && !defined(OS_WIN)
|
| #include "third_party/tcmalloc/chromium/src/gperftools/heap-profiler.h"
|
| #endif
|
| @@ -915,12 +912,12 @@ bool WebKitPlatformSupportImpl::memoryAllocatorWasteInBytes(size_t* size) {
|
| }
|
|
|
| size_t WebKitPlatformSupportImpl::maxDecodedImageBytes() {
|
| -#if defined(OS_ANDROID)
|
| - if (base::android::SysUtils::IsLowEndDevice()) {
|
| + if (base::SysUtils::IsLowEndDevice()) {
|
| // Limit image decoded size to 3M pixels on low end devices.
|
| // 4 is maximum number of bytes per pixel.
|
| return 3 * 1024 * 1024 * 4;
|
| }
|
| +#if defined(OS_ANDROID)
|
| // For other devices, limit decoded image size based on the amount of physical
|
| // memory. For a device with 2GB physical memory the limit is 16M pixels.
|
| return base::SysInfo::AmountOfPhysicalMemory() / 32;
|
|
|