diff options
author | Cary Clark <cary@android.com> | 2011-02-03 05:30:28 -0500 |
---|---|---|
committer | Cary Clark <cary@android.com> | 2011-02-03 05:38:05 -0500 |
commit | 8360bc9c9facd690e42379610cbbb368d3d705ef (patch) | |
tree | 8c5c6ee62a0fb7dcedeb76676f2b6ee4d09b0fce /WebKit | |
parent | 9962eebad92163d0ae56e3a76f48156682ddcced (diff) | |
download | external_webkit-8360bc9c9facd690e42379610cbbb368d3d705ef.zip external_webkit-8360bc9c9facd690e42379610cbbb368d3d705ef.tar.gz external_webkit-8360bc9c9facd690e42379610cbbb368d3d705ef.tar.bz2 |
stop GL drawing thread before killing WebCore
The TexturesGenerator thread references pictures owned by the
WebCore thread, so must be stopped before the WebCore thread
is deleted.
Requires a companion change in frameworks/base
bug:3406185
Change-Id: I20e64631bbf4a1b88fb015f3de36ce292234537d
Diffstat (limited to 'WebKit')
-rw-r--r-- | WebKit/android/nav/WebView.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/WebKit/android/nav/WebView.cpp b/WebKit/android/nav/WebView.cpp index 52092c8..935aecd 100644 --- a/WebKit/android/nav/WebView.cpp +++ b/WebKit/android/nav/WebView.cpp @@ -206,7 +206,7 @@ WebView(JNIEnv* env, jobject javaWebView, int viewImpl) : // We must remove the m_glWebViewState prior to deleting m_baseLayer. If we // do not remove it here, we risk having BaseTiles trying to paint using a // deallocated base layer. - delete m_glWebViewState; + stopGL(); #endif delete m_frameCacheUI; delete m_navPictureUI; @@ -214,6 +214,14 @@ WebView(JNIEnv* env, jobject javaWebView, int viewImpl) : delete m_glDrawFunctor; } +void stopGL() +{ +#if USE(ACCELERATED_COMPOSITING) + delete m_glWebViewState; + m_glWebViewState = 0; +#endif +} + WebViewCore* getWebViewCore() const { return m_viewImpl; } @@ -2207,6 +2215,11 @@ static void nativeDestroy(JNIEnv *env, jobject obj) delete view; } +static void nativeStopGL(JNIEnv *env, jobject obj) +{ + GET_NATIVE_VIEW(env, obj)->stopGL(); +} + static bool nativeMoveCursorToNextTextInput(JNIEnv *env, jobject obj) { WebView* view = GET_NATIVE_VIEW(env, obj); @@ -2564,6 +2577,8 @@ static JNINativeMethod gJavaWebViewMethods[] = { (void*) nativeShowCursorTimed }, { "nativeStartSelection", "(II)Z", (void*) nativeStartSelection }, + { "nativeStopGL", "()V", + (void*) nativeStopGL }, { "nativeSubtractLayers", "(Landroid/graphics/Rect;)Landroid/graphics/Rect;", (void*) nativeSubtractLayers }, { "nativeTextGeneration", "()I", |