Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Unified Diff: Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp

Issue 6465012: Merge 77599 - 2011-02-03 Victoria Kirst <vrk@google.com>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
===================================================================
--- Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp (revision 78002)
+++ Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp (working copy)
@@ -397,6 +397,17 @@
void WebMediaPlayerClientImpl::paint(GraphicsContext* context, const IntRect& rect)
{
+#if USE(ACCELERATED_COMPOSITING)
+ // If we are using GPU to render video, ignore requests to paint frames into
+ // canvas because it will be taken care of by VideoLayerChromium.
+ if (acceleratedRenderingInUse())
+ return;
+#endif
+ paintCurrentFrameInContext(context, rect);
+}
+
+void WebMediaPlayerClientImpl::paintCurrentFrameInContext(GraphicsContext* context, const IntRect& rect)
+{
// Normally GraphicsContext operations do nothing when painting is disabled.
// Since we're accessing platformContext() directly we have to manually
// check.
@@ -445,6 +456,11 @@
return m_supportsAcceleratedCompositing;
}
+bool WebMediaPlayerClientImpl::acceleratedRenderingInUse()
+{
+ return m_videoLayer.get() && m_videoLayer->layerRenderer();
+}
+
VideoFrameChromium* WebMediaPlayerClientImpl::getCurrentFrame()
{
VideoFrameChromium* videoFrame = 0;
« no previous file with comments | « Source/WebKit/chromium/src/WebMediaPlayerClientImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698