diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2012-02-28 16:27:47 -0800 |
---|---|---|
committer | Teng-Hui Zhu <ztenghui@google.com> | 2012-03-01 10:46:30 -0800 |
commit | 00144be011338276839a08a66ae79b14629b268b (patch) | |
tree | 533e91ef365f0840c77f0a87d19ccb865ed3be8e /Source/WebKit | |
parent | 7c9401fdc1f052f3e98bac0bef7b24ac743251e5 (diff) | |
download | external_webkit-00144be011338276839a08a66ae79b14629b268b.zip external_webkit-00144be011338276839a08a66ae79b14629b268b.tar.gz external_webkit-00144be011338276839a08a66ae79b14629b268b.tar.bz2 |
Cleanup GL resource for HTML5 Video.
Refactor the code such that the shared resources are in the VideoLayerManager
now.
Get rid of the solid color texture and use pure color shader.
bug:6079959
Change-Id: I0d1ce50157fb2ed083b9cc80464a1e61fa8e159f
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 132ed98..687f6b2 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); } } |