summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp')
-rw-r--r--Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
index 996e70710..ec74b6bea 100644
--- a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
+++ b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
@@ -28,6 +28,7 @@
#include "WebMediaElement.h"
#include "WebMediaPlayer.h"
#include "WebViewImpl.h"
+#include "cc/CCProxy.h"
#include "platform/WebCString.h"
#include "platform/WebCanvas.h"
#include "platform/WebKitPlatformSupport.h"
@@ -105,6 +106,8 @@ WebMediaPlayerClientImpl::~WebMediaPlayerClientImpl()
MutexLocker locker(m_compositingMutex);
if (m_videoFrameProviderClient)
m_videoFrameProviderClient->stopUsingProvider();
+ if (m_webMediaPlayer)
+ m_webMediaPlayer->setStreamTextureClient(0);
#endif
}
@@ -149,7 +152,7 @@ void WebMediaPlayerClientImpl::repaint()
ASSERT(m_mediaPlayer);
#if USE(ACCELERATED_COMPOSITING)
if (m_videoLayer && supportsAcceleratedRendering())
- m_videoLayer->setNeedsDisplay();
+ m_videoLayer->contentChanged();
#endif
m_mediaPlayer->repaint();
}
@@ -237,6 +240,7 @@ void WebMediaPlayerClientImpl::load(const String& url)
m_url = url;
if (m_preload == MediaPlayer::None) {
+ MutexLocker locker(m_compositingMutex);
#if ENABLE(WEB_AUDIO)
m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlayer's WebAudioSourceProvider.
#endif
@@ -248,6 +252,7 @@ void WebMediaPlayerClientImpl::load(const String& url)
void WebMediaPlayerClientImpl::loadInternal()
{
+ MutexLocker locker(m_compositingMutex);
#if ENABLE(WEB_AUDIO)
m_audioSourceProvider.wrap(0); // Clear weak reference to m_webMediaPlayer's WebAudioSourceProvider.
#endif
@@ -597,6 +602,8 @@ void WebMediaPlayerClientImpl::setVideoFrameProviderClient(VideoFrameProvider::C
{
MutexLocker locker(m_compositingMutex);
m_videoFrameProviderClient = client;
+ if (m_webMediaPlayer)
+ m_webMediaPlayer->setStreamTextureClient(client ? this : 0);
}
VideoFrameChromium* WebMediaPlayerClientImpl::getCurrentFrame()
@@ -679,6 +686,20 @@ void WebMediaPlayerClientImpl::startDelayedLoad()
loadInternal();
}
+void WebMediaPlayerClientImpl::didReceiveFrame()
+{
+ // No lock since this gets called on the client's thread.
+ ASSERT(CCProxy::isImplThread());
+ m_videoFrameProviderClient->didReceiveFrame();
+}
+
+void WebMediaPlayerClientImpl::didUpdateMatrix(const float* matrix)
+{
+ // No lock since this gets called on the client's thread.
+ ASSERT(CCProxy::isImplThread());
+ m_videoFrameProviderClient->didUpdateMatrix(matrix);
+}
+
WebMediaPlayerClientImpl::WebMediaPlayerClientImpl()
: m_mediaPlayer(0)
, m_delayingLoad(false)