Title: [129446] trunk/Source/WebCore
- Revision
- 129446
- Author
- [email protected]
- Date
- 2012-09-24 20:13:21 -0700 (Mon, 24 Sep 2012)
Log Message
[Blackberry] Add a software rendering path for media player
https://bugs.webkit.org/show_bug.cgi?id=97443
Patch by Robin Cao <[email protected]> on 2012-09-24
Reviewed by Yong Li.
This patch adds a software rendering path for media player. When accelerated rendering
is not supported by the media engine for the current media, the rendering will fallback
to this software path.
PR #212386
Reviewed internally by Max Feil.
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
(WebCore::MediaPlayerPrivate::paint):
(WebCore::MediaPlayerPrivate::updateStates):
(WebCore::MediaPlayerPrivate::supportsAcceleratedRendering):
(WebCore):
* platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
(MediaPlayerPrivate):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (129445 => 129446)
--- trunk/Source/WebCore/ChangeLog 2012-09-25 02:56:35 UTC (rev 129445)
+++ trunk/Source/WebCore/ChangeLog 2012-09-25 03:13:21 UTC (rev 129446)
@@ -1,3 +1,25 @@
+2012-09-24 Robin Cao <[email protected]>
+
+ [Blackberry] Add a software rendering path for media player
+ https://bugs.webkit.org/show_bug.cgi?id=97443
+
+ Reviewed by Yong Li.
+
+ This patch adds a software rendering path for media player. When accelerated rendering
+ is not supported by the media engine for the current media, the rendering will fallback
+ to this software path.
+
+ PR #212386
+ Reviewed internally by Max Feil.
+
+ * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
+ (WebCore::MediaPlayerPrivate::paint):
+ (WebCore::MediaPlayerPrivate::updateStates):
+ (WebCore::MediaPlayerPrivate::supportsAcceleratedRendering):
+ (WebCore):
+ * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
+ (MediaPlayerPrivate):
+
2012-09-24 Benjamin Poulain <[email protected]>
Fix Geolocation error reporting in the test support
Modified: trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp (129445 => 129446)
--- trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp 2012-09-25 02:56:35 UTC (rev 129445)
+++ trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp 2012-09-25 03:13:21 UTC (rev 129446)
@@ -347,13 +347,16 @@
return;
#if USE(ACCELERATED_COMPOSITING)
- // Only process paint calls coming via the accelerated compositing code
- // path, where we get called with a null graphics context. See
- // LayerCompositingThread::drawTextures(). Ignore calls from the regular
- // rendering path.
- if (!context)
- m_platformPlayer->notifyOutputUpdate(BlackBerry::Platform::IntRect(rect.x(), rect.y(), rect.width(), rect.height()));
- return;
+ if (supportsAcceleratedRendering()) {
+ // Only process paint calls coming via the accelerated compositing code
+ // path, where we get called with a null graphics context. See
+ // LayerCompositingThread::drawTextures(). Ignore calls from the regular
+ // rendering path.
+ if (!context)
+ m_platformPlayer->notifyOutputUpdate(BlackBerry::Platform::IntRect(rect.x(), rect.y(), rect.width(), rect.height()));
+
+ return;
+ }
#endif
paintCurrentFrameInContext(context, rect);
@@ -540,7 +543,7 @@
m_showBufferingImage = false;
m_mediaIsBuffering = false;
// Create platform layer for video (create hole punch rect).
- if (!m_platformLayer)
+ if (!m_platformLayer && supportsAcceleratedRendering())
m_platformLayer = VideoLayerWebKitThread::create(m_webCorePlayer);
#endif
break;
@@ -820,6 +823,13 @@
return m_webCorePlayer->mediaPlayerClient()->mediaPlayerHostWindow()->platformPageClient()->isVisible();
}
+bool MediaPlayerPrivate::supportsAcceleratedRendering() const
+{
+ if (m_platformPlayer)
+ return m_platformPlayer->supportsAcceleratedRendering();
+ return false;
+}
+
#if USE(ACCELERATED_COMPOSITING)
static const double BufferingAnimationDelay = 1.0 / 24;
static char* s_bufferingImageData = 0;
Modified: trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h (129445 => 129446)
--- trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h 2012-09-25 02:56:35 UTC (rev 129445)
+++ trunk/Source/WebCore/platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h 2012-09-25 03:13:21 UTC (rev 129446)
@@ -96,7 +96,7 @@
#if USE(ACCELERATED_COMPOSITING)
// Whether accelerated rendering is supported by the media engine for the current media.
- virtual bool supportsAcceleratedRendering() const { return true; }
+ virtual bool supportsAcceleratedRendering() const;
// Called when the rendering system flips the into or out of accelerated rendering mode.
virtual void acceleratedRenderingStateChanged() { }
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes