diff options
author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-24 16:36:50 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-02-24 16:36:50 +0100 |
commit | ad0d549d4cc13433f77c1ac8f0ab379c83d93f28 (patch) | |
tree | b34b0daceb7c8e7fdde4b4ec43650ab7caadb0a9 /Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp | |
parent | 03e12282df9aa1e1fb05a8b90f1cfc2e08764cec (diff) | |
download | qtwebkit-ad0d549d4cc13433f77c1ac8f0ab379c83d93f28.tar.gz |
Imported WebKit commit bb52bf3c0119e8a128cd93afe5572413a8617de9 (http://svn.webkit.org/repository/webkit/trunk@108790)
Diffstat (limited to 'Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp')
-rw-r--r-- | Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp | 23 |
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) |