summaryrefslogtreecommitdiffstats
path: root/WebCore/platform
diff options
context:
space:
mode:
authorDerek Sollenberger <djsollen@google.com>2011-02-07 13:50:58 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2011-02-07 13:50:58 -0800
commit1d9f4181afce8563f351e3ed505e5ccf415e4176 (patch)
tree9f40eafad3cd81307de166fc3de3d313b14a9b90 /WebCore/platform
parent2e7db7594335b3202dd085c9f70ea727b4ffb1e9 (diff)
parentad1398b85d7cef3bd7c3dc833921fcdb3c7f06f6 (diff)
downloadexternal_webkit-1d9f4181afce8563f351e3ed505e5ccf415e4176.zip
external_webkit-1d9f4181afce8563f351e3ed505e5ccf415e4176.tar.gz
external_webkit-1d9f4181afce8563f351e3ed505e5ccf415e4176.tar.bz2
am ad1398b8: am 79f07c99: Fix to post an inval when plugins request a native video surface.
* commit 'ad1398b85d7cef3bd7c3dc833921fcdb3c7f06f6': Fix to post an inval when plugins request a native video surface.
Diffstat (limited to 'WebCore/platform')
-rw-r--r--WebCore/platform/graphics/android/MediaTexture.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/WebCore/platform/graphics/android/MediaTexture.cpp b/WebCore/platform/graphics/android/MediaTexture.cpp
index c994e78..a92b570 100644
--- a/WebCore/platform/graphics/android/MediaTexture.cpp
+++ b/WebCore/platform/graphics/android/MediaTexture.cpp
@@ -158,8 +158,23 @@ ANativeWindow* VideoTexture::requestNewWindow()
}
m_newWindowRequest = true;
+
+ // post an inval message to the UI thread to fulfill the request
+ if (m_weakWebViewRef) {
+ JNIEnv* env = JSC::Bindings::getJNIEnv();
+ jobject localWebViewRef = env->NewLocalRef(m_weakWebViewRef);
+ if (localWebViewRef) {
+ jclass wvClass = env->GetObjectClass(localWebViewRef);
+ jmethodID postInvalMethod = env->GetMethodID(wvClass, "postInvalidate", "()V");
+ env->CallVoidMethod(localWebViewRef, postInvalMethod);
+ env->DeleteLocalRef(wvClass);
+ env->DeleteLocalRef(localWebViewRef);
+ }
+ checkException(env);
+ }
+
//block until the request can be fulfilled or we time out
- m_newVideoRequestCond.waitRelative(m_videoLock, 1000000000); // 1 sec
+ m_newVideoRequestCond.waitRelative(m_videoLock, 500000000); // .5 sec
if (m_surfaceTextureClient.get())
m_newWindowReady = false;