diff options
author | Chris Craik <ccraik@google.com> | 2011-09-07 20:04:24 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2011-09-08 11:53:34 -0700 |
commit | 2986d27084d881dbe6f9c3ae35430a5978b7e659 (patch) | |
tree | d668f05a054a03035d07bae9e001ab8282f3d6ae /Source/WebKit | |
parent | 321b119b4942dca02c7557790c7951695473ae7d (diff) | |
download | external_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.cpp | 4 |
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) |