summaryrefslogtreecommitdiffstats
path: root/Source/WebKit
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2011-09-07 20:04:24 -0700
committerChris Craik <ccraik@google.com>2011-09-08 11:53:34 -0700
commit2986d27084d881dbe6f9c3ae35430a5978b7e659 (patch)
treed668f05a054a03035d07bae9e001ab8282f3d6ae /Source/WebKit
parent321b119b4942dca02c7557790c7951695473ae7d (diff)
downloadexternal_webkit-2986d27084d881dbe6f9c3ae35430a5978b7e659.zip
external_webkit-2986d27084d881dbe6f9c3ae35430a5978b7e659.tar.gz
external_webkit-2986d27084d881dbe6f9c3ae35430a5978b7e659.tar.bz2
Deallocate graphics memory with onTrimMemory signals
bug:5269460 Deallocate the graphics memory backing a BaseTileTexture on onTrimMemory signals, and accordingly allocate it lazily, as needed. Change-Id: I52039723f47e6470e4fe8dd987d384017005390f
Diffstat (limited to 'Source/WebKit')
-rw-r--r--Source/WebKit/android/nav/WebView.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp
index ebbbc1a..a528e9a 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -2573,6 +2573,10 @@ static jstring nativeGetProperty(JNIEnv *env, jobject obj, jstring key)
static void nativeOnTrimMemory(JNIEnv *env, jobject obj, jint level)
{
+ if (TilesManager::hardwareAccelerationEnabled()) {
+ bool freeAllTextures = (level > TRIM_MEMORY_UI_HIDDEN);
+ TilesManager::instance()->deallocateTextures(freeAllTextures);
+ }
}
static void nativeDumpDisplayTree(JNIEnv* env, jobject jwebview, jstring jurl)