Chromium Code Reviews| Index: webkit/child/webkitplatformsupport_impl.cc |
| diff --git a/webkit/child/webkitplatformsupport_impl.cc b/webkit/child/webkitplatformsupport_impl.cc |
| index 50c9a787d4ac800dbb2a7ae1b38e2326ddac6e9b..6fb30d1c76f148ead7397f2102200a154361c52f 100644 |
| --- a/webkit/child/webkitplatformsupport_impl.cc |
| +++ b/webkit/child/webkitplatformsupport_impl.cc |
| @@ -51,6 +51,10 @@ |
| #include "webkit/common/user_agent/user_agent.h" |
| #include "webkit/glue/webkit_glue.h" |
| +#if defined(OS_ANDROID) |
| +#include "base/android/sys_utils.h" |
| +#endif |
| + |
| using WebKit::WebAudioBus; |
| using WebKit::WebCookie; |
| using WebKit::WebData; |
| @@ -879,6 +883,15 @@ bool WebKitPlatformSupportImpl::memoryAllocatorWasteInBytes(size_t* size) { |
| return base::allocator::GetAllocatorWasteSize(size); |
| } |
| +size_t WebKitPlatformSupportImpl::maxImageDecodedBytes() { |
| +#if defined(OS_ANDROID) |
| + // Limit image decoded size to 3M pixels on low end devices. |
| + if (base::android::SysUtils::IsLowEndDevice()) |
| + return 3 * 1000 * 1000 * 4; // 4 is maximum number of bytes per pixel. |
|
tony
2013/09/20 23:14:57
Nit: Why 1000 instead of 1024?
Xianzhu
2013/09/20 23:23:56
Just followed the same behavior of iOS browser. Ag
|
| +#endif |
| + return std::numeric_limits<size_t>::max(); // Unlimited. |
| +} |
| + |
| void WebKitPlatformSupportImpl::SuspendSharedTimer() { |
| ++shared_timer_suspended_; |
| } |