[BlackBerry] draw <video> on <canvas> does not work
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 09:52:25 +0000 (09:52 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 09:52:25 +0000 (09:52 +0000)
https://bugs.webkit.org/show_bug.cgi?id=94791
PR #195866

Patch by Robin Cao <robin.cao@torchmobile.com.cn> on 2012-08-23
Reviewed by George Staikos.

Re-implement MediaPlayerPrivate::paintCurrentFrameInContext() in the
blackberry port. This method is mainly called from <canvas>, and it
is supposed to paint video frames using software rendering path.

On the other hand, MediaPlayerPrivate::paint() will choose accelerated
rendering if possible.

media/video-canvas-alpha.html covers this.

* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::paint):
(WebCore):
(WebCore::MediaPlayerPrivate::paintCurrentFrameInContext):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
(MediaPlayerPrivate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126412 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp
Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h

index 5e9bd37..8e4b38a 100644 (file)
@@ -1,3 +1,27 @@
+2012-08-23  Robin Cao  <robin.cao@torchmobile.com.cn>
+
+        [BlackBerry] draw <video> on <canvas> does not work
+        https://bugs.webkit.org/show_bug.cgi?id=94791
+        PR #195866
+
+        Reviewed by George Staikos.
+
+        Re-implement MediaPlayerPrivate::paintCurrentFrameInContext() in the
+        blackberry port. This method is mainly called from <canvas>, and it
+        is supposed to paint video frames using software rendering path.
+
+        On the other hand, MediaPlayerPrivate::paint() will choose accelerated
+        rendering if possible.
+
+        media/video-canvas-alpha.html covers this.
+
+        * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
+        (WebCore::MediaPlayerPrivate::paint):
+        (WebCore):
+        (WebCore::MediaPlayerPrivate::paintCurrentFrameInContext):
+        * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
+        (MediaPlayerPrivate):
+
 2012-08-23  Kentaro Hara  <haraken@chromium.org>
 
         Unreviewed. Build fix for r126399.
index 4256818..6fad26e 100644 (file)
@@ -358,6 +358,11 @@ void MediaPlayerPrivate::paint(GraphicsContext* context, const IntRect& rect)
     return;
 #endif
 
+    paintCurrentFrameInContext(context, rect);
+}
+
+void MediaPlayerPrivate::paintCurrentFrameInContext(GraphicsContext* context, const IntRect& rect)
+{
     if (!hasVideo() || context->paintingDisabled() || !m_webCorePlayer->visible())
         return;
 
index c378bf6..40156fb 100644 (file)
@@ -89,6 +89,8 @@ public:
 
     virtual void paint(GraphicsContext*, const IntRect&);
 
+    virtual void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
+
     virtual bool hasAvailableVideoFrame() const;
 
 #if USE(ACCELERATED_COMPOSITING)