diff options
Diffstat (limited to 'WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm')
-rw-r--r-- | WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm index dd87bb5..2b90f7a 100644 --- a/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm +++ b/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm @@ -445,12 +445,7 @@ void MediaPlayerPrivate::createQTMovieLayer() #ifndef NDEBUG [(CALayer *)m_qtVideoLayer.get() setName:@"Video layer"]; #endif - - // Hang the video layer from the render layer, if we have one yet. If not, we'll do this - // later via acceleratedRenderingStateChanged(). - GraphicsLayer* videoGraphicsLayer = m_player->mediaPlayerClient()->mediaPlayerGraphicsLayer(m_player); - if (videoGraphicsLayer) - videoGraphicsLayer->setContentsToMedia(m_qtVideoLayer.get()); + // The layer will get hooked up via RenderLayerBacking::updateGraphicsLayerConfiguration(). } #endif } @@ -522,6 +517,11 @@ void MediaPlayerPrivate::setUpVideoRendering() createQTMovieLayer(); break; } + +#if USE(ACCELERATED_COMPOSITING) + if (currentMode == MediaRenderingMovieLayer || preferredMode == MediaRenderingMovieLayer) + m_player->mediaPlayerClient()->mediaPlayerRenderingModeChanged(m_player); +#endif } void MediaPlayerPrivate::tearDownVideoRendering() @@ -576,6 +576,13 @@ PlatformMedia MediaPlayerPrivate::platformMedia() const return plaftformMedia; } +#if USE(ACCELERATED_COMPOSITING) +PlatformLayer* MediaPlayerPrivate::platformLayer() const +{ + return m_qtVideoLayer.get(); +} +#endif + void MediaPlayerPrivate::play() { if (!metaDataAvailable()) @@ -1406,12 +1413,6 @@ void MediaPlayerPrivate::acceleratedRenderingStateChanged() { // Set up or change the rendering path if necessary. setUpVideoRendering(); - - if (currentRenderingMode() == MediaRenderingMovieLayer) { - GraphicsLayer* videoGraphicsLayer = m_player->mediaPlayerClient()->mediaPlayerGraphicsLayer(m_player); - if (videoGraphicsLayer) - videoGraphicsLayer->setContentsToMedia(m_qtVideoLayer.get()); - } } #endif |