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..d1c5960b3315397566764244443880627a11bb92 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. |
| +#endif |
| + return 0; // Unlimited. |
|
tony
2013/09/20 22:27:04
Having 0 mean unlimited is a bit weird. Why not r
Xianzhu
2013/09/20 23:13:47
Done.
|
| +} |
| + |
| void WebKitPlatformSupportImpl::SuspendSharedTimer() { |
| ++shared_timer_suspended_; |
| } |