From 692e5dbf12901edacf14812a6fae25462920af42 Mon Sep 17 00:00:00 2001 From: Steve Block Date: Tue, 27 Apr 2010 16:23:55 +0100 Subject: Merge webkit.org at r55033 : Initial merge by git Change-Id: I98a4af828067cc243ec3dc5e5826154dd88074b5 --- WebCore/platform/graphics/win/IconWin.cpp | 1 + .../win/MediaPlayerPrivateQuickTimeWin.cpp | 23 +++++++++++++--------- .../graphics/win/MediaPlayerPrivateQuickTimeWin.h | 3 +++ 3 files changed, 18 insertions(+), 9 deletions(-) (limited to 'WebCore/platform/graphics/win') diff --git a/WebCore/platform/graphics/win/IconWin.cpp b/WebCore/platform/graphics/win/IconWin.cpp index 56b46de..cc9343a 100644 --- a/WebCore/platform/graphics/win/IconWin.cpp +++ b/WebCore/platform/graphics/win/IconWin.cpp @@ -47,6 +47,7 @@ Icon::~Icon() DestroyIcon(m_hIcon); } +// FIXME: Move the code to ChromeClient::iconForFiles(). PassRefPtr Icon::createIconForFiles(const Vector& filenames) { if (filenames.isEmpty()) diff --git a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp index b2fe069..1df73a7 100644 --- a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp +++ b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp @@ -108,6 +108,13 @@ PlatformMedia MediaPlayerPrivate::platformMedia() const return p; } +#if USE(ACCELERATED_COMPOSITING) +PlatformLayer* MediaPlayerPrivate::platformLayer() const +{ + return m_qtVideoLayer->platformLayer(); +} +#endif + class TaskTimer : TimerBase { public: static void initialize(); @@ -745,6 +752,11 @@ void MediaPlayerPrivate::setUpVideoRendering() if (preferredMode == MediaRenderingMovieLayer) createLayerForMovie(); + +#if USE(ACCELERATED_COMPOSITING) + if (currentMode == MediaRenderingMovieLayer || preferredMode == MediaRenderingMovieLayer) + m_player->mediaPlayerClient()->mediaPlayerRenderingModeChanged(m_player); +#endif } void MediaPlayerPrivate::tearDownVideoRendering() @@ -810,11 +822,6 @@ void MediaPlayerPrivate::createLayerForMovie() if (!m_qtMovie || m_qtVideoLayer) return; - // Do nothing if the parent layer hasn't been set up yet. - GraphicsLayer* videoGraphicsLayer = m_player->mediaPlayerClient()->mediaPlayerGraphicsLayer(m_player); - if (!videoGraphicsLayer) - return; - // Create a GraphicsLayer that won't be inserted directly into the render tree, but will used // as a wrapper for a WKCACFLayer which gets inserted as the content layer of the video // renderer's GraphicsLayer. @@ -829,9 +836,7 @@ void MediaPlayerPrivate::createLayerForMovie() #ifndef NDEBUG m_qtVideoLayer->setName("Video layer"); #endif - - // Hang the video layer from the render layer. - videoGraphicsLayer->setContentsToMedia(m_qtVideoLayer->platformLayer()); + // The layer will get hooked up via RenderLayerBacking::updateGraphicsLayerConfiguration(). #endif } @@ -858,7 +863,7 @@ void MediaPlayerPrivate::acceleratedRenderingStateChanged() void MediaPlayerPrivate::notifySyncRequired(const GraphicsLayer*) { - GraphicsLayerCACF* videoGraphicsLayer = static_cast(m_player->mediaPlayerClient()->mediaPlayerGraphicsLayer(m_player)); + GraphicsLayerCACF* videoGraphicsLayer = static_cast(m_qtVideoLayer.get()); if (videoGraphicsLayer) videoGraphicsLayer->notifySyncRequired(); } diff --git a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h index d58f44f..029a520 100644 --- a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h +++ b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.h @@ -76,6 +76,9 @@ private: virtual bool supportsFullscreen() const; virtual PlatformMedia platformMedia() const; +#if USE(ACCELERATED_COMPOSITING) + PlatformLayer* platformLayer() const; +#endif IntSize naturalSize() const; bool hasVideo() const; -- cgit v1.1