Changeset 77207 in webkit


Ignore:
Timestamp:
Jan 31, 2011 7:46:19 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

2011-01-31 Kalle Vahlman <kalle.vahlman@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:
Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r77206 r77207  
     12011-01-31  Kalle Vahlman  <kalle.vahlman@movial.com>
     2
     3        Reviewed by Andreas Kling.
     4
     5        [Qt] canvas.drawImage(HTMLVideoElement) doesn't work with Qt Multimedia backend
     6        https://bugs.webkit.org/show_bug.cgi?id=53325
     7
     8        Reimplement paintCurrentFrameInContext() rather than delegate the
     9        rendering to paint() to make sure we really do get the video frame
     10        content into the GraphicsContext, regardless of accelerated
     11        compositing and the video scene state.
     12
     13        * platform/graphics/qt/MediaPlayerPrivateQt.cpp:
     14        (WebCore::MediaPlayerPrivateQt::paintCurrentFrameInContext):
     15        * platform/graphics/qt/MediaPlayerPrivateQt.h:
     16
    1172011-01-31  Emil A Eklund  <eae@chromium.org>
    218
  • trunk/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.cpp

    r76265 r77207  
    619619}
    620620
     621void MediaPlayerPrivateQt::paintCurrentFrameInContext(GraphicsContext* context, const IntRect& rect)
     622{
     623    if (context->paintingDisabled())
     624        return;
     625
     626    if (!m_isVisible)
     627        return;
     628
     629    // Grab the painter and widget
     630    QPainter* painter = context->platformContext();
     631
     632    // Render the video, using the item as it might not be in the scene
     633    m_videoItem->paint(painter, 0, 0);
     634}
     635
    621636void MediaPlayerPrivateQt::repaint()
    622637{
  • trunk/Source/WebCore/platform/graphics/qt/MediaPlayerPrivateQt.h

    r75944 r77207  
    9090
    9191    void paint(GraphicsContext*, const IntRect&);
     92    // reimplemented for canvas drawImage(HTMLVideoElement)
     93    void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
    9294
    9395    bool supportsFullscreen() const { return true; }
Note: See TracChangeset for help on using the changeset viewer.