Title: [126412] trunk/Source/WebCore
Revision
126412
Author
commit-qu...@webkit.org
Date
2012-08-23 02:52:25 -0700 (Thu, 23 Aug 2012)

Log Message

[BlackBerry] draw <video> on <canvas> does not work
https://bugs.webkit.org/show_bug.cgi?id=94791
PR #195866

Patch by Robin Cao <robin....@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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (126411 => 126412)


--- trunk/Source/WebCore/ChangeLog	2012-08-23 09:42:53 UTC (rev 126411)
+++ trunk/Source/WebCore/ChangeLog	2012-08-23 09:52:25 UTC (rev 126412)
@@ -1,3 +1,27 @@
+2012-08-23  Robin Cao  <robin....@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  <hara...@chromium.org>
 
         Unreviewed. Build fix for r126399.

Modified: trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp (126411 => 126412)


--- trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp	2012-08-23 09:42:53 UTC (rev 126411)
+++ trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp	2012-08-23 09:52:25 UTC (rev 126412)
@@ -358,6 +358,11 @@
     return;
 #endif
 
+    paintCurrentFrameInContext(context, rect);
+}
+
+void MediaPlayerPrivate::paintCurrentFrameInContext(GraphicsContext* context, const IntRect& rect)
+{
     if (!hasVideo() || context->paintingDisabled() || !m_webCorePlayer->visible())
         return;
 

Modified: trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h (126411 => 126412)


--- trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h	2012-08-23 09:42:53 UTC (rev 126411)
+++ trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h	2012-08-23 09:52:25 UTC (rev 126412)
@@ -89,6 +89,8 @@
 
     virtual void paint(GraphicsContext*, const IntRect&);
 
+    virtual void paintCurrentFrameInContext(GraphicsContext*, const IntRect&);
+
     virtual bool hasAvailableVideoFrame() const;
 
 #if USE(ACCELERATED_COMPOSITING)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to