summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/android/PlatformBridge.h
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-08-10 13:17:08 +0100
committerBen Murdoch <benm@google.com>2011-08-12 17:26:30 +0100
commit3e556736c899f74f2ccc010a8bc7401c36e9a1a0 (patch)
treed4938bc18892148a044ca7bf4715bdd040053946 /Source/WebCore/platform/android/PlatformBridge.h
parent6a94579dab1dca12e6555b01602efeb5debda17a (diff)
downloadexternal_webkit-3e556736c899f74f2ccc010a8bc7401c36e9a1a0.zip
external_webkit-3e556736c899f74f2ccc010a8bc7401c36e9a1a0.tar.gz
external_webkit-3e556736c899f74f2ccc010a8bc7401c36e9a1a0.tar.bz2
Check the available memory when allocating an ImageBuffer.
The ImageBuffers used by canvas can eat a ton of memory quickly, so be mindful of the available memory on the device before allocating them. See also frameworks/base change I3d0f85075497c2a374cd866b0223eecaaa4b5f46 Bug: 5142892 Change-Id: I74d243ef9d0d63aac168c16653e9aae0430dfa21
Diffstat (limited to 'Source/WebCore/platform/android/PlatformBridge.h')
-rw-r--r--Source/WebCore/platform/android/PlatformBridge.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/WebCore/platform/android/PlatformBridge.h b/Source/WebCore/platform/android/PlatformBridge.h
index f20a001..a4c1048 100644
--- a/Source/WebCore/platform/android/PlatformBridge.h
+++ b/Source/WebCore/platform/android/PlatformBridge.h
@@ -148,6 +148,7 @@ public:
static int highUsageDeltaMB();
static int memoryUsageMB();
static int actualMemoryUsageMB();
+ static bool canSatisfyMemoryAllocation(long bytes);
static int screenWidthInDocCoord(const FrameView*);
static int screenHeightInDocCoord(const FrameView*);