summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/nav
diff options
context:
space:
mode:
authorTeng-Hui Zhu <ztenghui@google.com>2012-02-27 14:31:00 -0800
committerTeng-Hui Zhu <ztenghui@google.com>2012-02-27 16:40:57 -0800
commit886eb87d34570b706a0f17fa944d98870ed6a2af (patch)
tree9ddf1fdc73d0c25a0cdea7aa7b662d480b0c7e11 /Source/WebKit/android/nav
parenteec5b0af072de315fa24ad51ff99ad9c09ace399 (diff)
downloadexternal_webkit-886eb87d34570b706a0f17fa944d98870ed6a2af.zip
external_webkit-886eb87d34570b706a0f17fa944d98870ed6a2af.tar.gz
external_webkit-886eb87d34570b706a0f17fa944d98870ed6a2af.tar.bz2
Gl resource should be re-initialized after EGL context changed
EGLContext can be re-created when memory pressure is very high, that will delete all the GL resources automatically. After this, we should re-create the GL resources for webView. bug:6075574 Change-Id: I3035554d124cee38df3ba2dfae1eda0568b45d0f
Diffstat (limited to 'Source/WebKit/android/nav')
-rw-r--r--Source/WebKit/android/nav/WebView.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp
index 9e3c094..7919fdd 100644
--- a/Source/WebKit/android/nav/WebView.cpp
+++ b/Source/WebKit/android/nav/WebView.cpp
@@ -2267,8 +2267,10 @@ static void nativeOnTrimMemory(JNIEnv *env, jobject obj, jint level)
// Texture to avoid ANR b/c framework may destroy the EGL context.
// Refer to WindowManagerImpl.java for conditions we followed.
if (level >= TRIM_MEMORY_MODERATE
- && !TilesManager::instance()->highEndGfx())
+ && !TilesManager::instance()->highEndGfx()) {
TilesManager::instance()->transferQueue()->emptyQueue();
+ TilesManager::instance()->setContextChanged(true);
+ }
bool freeAllTextures = (level > TRIM_MEMORY_UI_HIDDEN), glTextures = true;
TilesManager::instance()->discardTextures(freeAllTextures, glTextures);