diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2012-03-01 11:33:01 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-03-01 11:33:01 -0800 |
commit | 56b4137d1b6400ff25b9d6b00c8f12846a616f95 (patch) | |
tree | 43c07d32d9e70f739cc3974d9694b14ac652ebd9 /Source/WebKit | |
parent | a0798fea895a9be431e9357b9a0481a189b69980 (diff) | |
parent | 00144be011338276839a08a66ae79b14629b268b (diff) | |
download | external_webkit-56b4137d1b6400ff25b9d6b00c8f12846a616f95.zip external_webkit-56b4137d1b6400ff25b9d6b00c8f12846a616f95.tar.gz external_webkit-56b4137d1b6400ff25b9d6b00c8f12846a616f95.tar.bz2 |
Merge "Cleanup GL resource for HTML5 Video."
Diffstat (limited to 'Source/WebKit')
-rw-r--r-- | Source/WebKit/android/nav/WebView.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/WebKit/android/nav/WebView.cpp b/Source/WebKit/android/nav/WebView.cpp index 09b6c3d..ba6d121 100644 --- a/Source/WebKit/android/nav/WebView.cpp +++ b/Source/WebKit/android/nav/WebView.cpp @@ -1418,14 +1418,16 @@ static void nativeOnTrimMemory(JNIEnv *env, jobject obj, jint level) // make sure the transfer queue is empty and then abandon the Surface // Texture to avoid ANR b/c framework may destroy the EGL context. // Refer to WindowManagerImpl.java for conditions we followed. + TilesManager* tilesManager = TilesManager::instance(); if (level >= TRIM_MEMORY_MODERATE - && !TilesManager::instance()->highEndGfx()) { - TilesManager::instance()->transferQueue()->emptyQueue(); - TilesManager::instance()->shader()->cleanupGLResources(); + && !tilesManager->highEndGfx()) { + tilesManager->transferQueue()->emptyQueue(); + tilesManager->shader()->cleanupGLResources(); + tilesManager->videoLayerManager()->cleanupGLResources(); } bool freeAllTextures = (level > TRIM_MEMORY_UI_HIDDEN), glTextures = true; - TilesManager::instance()->discardTextures(freeAllTextures, glTextures); + tilesManager->discardTextures(freeAllTextures, glTextures); } } |