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.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
index cb756233e..4a90a988d 100644
--- a/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
+++ b/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
@@ -109,9 +109,9 @@ void WebMediaPlayerClientImpl::readyStateChanged()
ASSERT(m_mediaPlayer);
m_mediaPlayer->readyStateChanged();
#if USE(ACCELERATED_COMPOSITING)
- if (hasVideo() && supportsAcceleratedRendering() && !m_videoLayer) {
- m_videoLayer = adoptPtr(WebVideoLayer::create(this));
- m_videoLayer->layer()->setOpaque(m_opaque);
+ if (hasVideo() && supportsAcceleratedRendering() && m_videoLayer.isNull()) {
+ m_videoLayer = WebVideoLayer::create(this);
+ m_videoLayer.setOpaque(m_opaque);
}
#endif
}
@@ -138,8 +138,8 @@ void WebMediaPlayerClientImpl::repaint()
{
ASSERT(m_mediaPlayer);
#if USE(ACCELERATED_COMPOSITING)
- if (m_videoLayer && supportsAcceleratedRendering())
- m_videoLayer->layer()->invalidate();
+ if (!m_videoLayer.isNull() && supportsAcceleratedRendering())
+ m_videoLayer.invalidate();
#endif
m_mediaPlayer->repaint();
}
@@ -166,8 +166,8 @@ void WebMediaPlayerClientImpl::setOpaque(bool opaque)
{
#if USE(ACCELERATED_COMPOSITING)
m_opaque = opaque;
- if (m_videoLayer)
- m_videoLayer->layer()->setOpaque(m_opaque);
+ if (!m_videoLayer.isNull())
+ m_videoLayer.setOpaque(m_opaque);
#endif
}
@@ -343,7 +343,7 @@ void WebMediaPlayerClientImpl::cancelLoad()
WebLayer* WebMediaPlayerClientImpl::platformLayer() const
{
ASSERT(m_supportsAcceleratedCompositing);
- return m_videoLayer ? m_videoLayer->layer() : 0;
+ return const_cast<WebVideoLayer*>(&m_videoLayer);
}
#endif
@@ -745,7 +745,7 @@ bool WebMediaPlayerClientImpl::supportsAcceleratedRendering() const
bool WebMediaPlayerClientImpl::acceleratedRenderingInUse()
{
- return m_videoLayer && m_videoLayer->active();
+ return !m_videoLayer.isNull() && m_videoLayer.active();
}
void WebMediaPlayerClientImpl::setVideoFrameProviderClient(WebVideoFrameProvider::Client* client)