+2012-09-24 Robin Cao <robin.cao@torchmobile.com.cn>
+
+ [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 <bpoulain@apple.com>
Fix Geolocation error reporting in the test support
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);
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;
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;
#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