[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

commit-queue at webkit.org commit-queue at webkit.org
Mon Feb 21 00:29:18 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit a4e829875eafa4393b36113c3de53a46025675ec
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Feb 1 03:46:19 2011 +0000

    2011-01-31  Kalle Vahlman  <kalle.vahlman at movial.com>
    
            Reviewed by Andreas Kling.
    
            [Qt] canvas.drawImage(HTMLVideoElement) doesn't work with Qt Multimedia backend
            https://bugs.webkit.org/show_bug.cgi?id=53325
    
            Reimplement paintCurrentFrameInContext() rather than delegate the
            rendering to paint() to make sure we really do get the video frame
            content into the GraphicsContext, regardless of accelerated
            compositing and the video scene state.
    
            * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
            (WebCore::MediaPlayerPrivateQt::paintCurrentFrameInContext):
            * platform/graphics/qt/MediaPlayerPrivateQt.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77207 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 283f288..5bf7458 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2011-01-31  Kalle Vahlman  <kalle.vahlman at movial.com>
+
+        Reviewed by Andreas Kling.
+
+        [Qt] canvas.drawImage(HTMLVideoElement) doesn't work with Qt Multimedia backend
+        https://bugs.webkit.org/show_bug.cgi?id=53325
+
+        Reimplement paintCurrentFrameInContext() rather than delegate the
+        rendering to paint() to make sure we really do get the video frame
+        content into the GraphicsContext, regardless of accelerated
+        compositing and the video scene state.
+
+        * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
+        (WebCore::MediaPlayerPrivateQt::paintCurrentFrameInContext):
+        * platform/graphics/qt/MediaPlayerPrivateQt.h:
+
 2011-01-31  Emil A Eklund  <eae at chromium.org>
 
         Reviewed by Darin Adler.
diff --git a/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp b/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp
index 0a4c0f6..ea42224 100644
--- a/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp
@@ -618,6 +618,21 @@ void MediaPlayerPrivateQt::paint(GraphicsContext* context, const IntRect& rect)
     m_videoScene->render(painter, QRectF(QRect(rect)), m_videoItem->sceneBoundingRect());
 }
 
+void MediaPlayerPrivateQt::paintCurrentFrameInContext(GraphicsContext* context, const IntRect& rect)
+{
+    if (context->paintingDisabled())
+        return;
+
+    if (!m_isVisible)
+        return;
+
+    // Grab the painter and widget
+    QPainter* painter = context->platformContext();
+
+    // Render the video, using the item as it might not be in the scene
+    m_videoItem->paint(painter, 0, 0);
+}
+
 void MediaPlayerPrivateQt::repaint()
 {
     m_webCorePlayer->repaint();
diff --git a/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.h b/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.h
index 2621432..e4133db 100644
--- a/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.h
+++ b/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.h
@@ -89,6 +89,8 @@ public:
     void setSize(const IntSize&);
 
     void paint(GraphicsContext*, const IntRect&);
+    // reimplemented for canvas drawImage(HTMLVideoElement)
+    void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
 
     bool supportsFullscreen() const { return true; }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list